avcodec/v4l2m2m: allow lower minimum buffer values
There is no reason to enforce a high minimum. In the context of streaming only a few output buffers and capture buffers are even needed for continuous playback. This also helps alleviate memory pressure when decoding 4K media. Signed-off-by: Aman Karmani <aman@tmm1.net>
This commit is contained in:
parent
18d9959fd9
commit
0d7c452d84
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
#define V4L_M2M_DEFAULT_OPTS \
|
#define V4L_M2M_DEFAULT_OPTS \
|
||||||
{ "num_output_buffers", "Number of buffers in the output context",\
|
{ "num_output_buffers", "Number of buffers in the output context",\
|
||||||
OFFSET(num_output_buffers), AV_OPT_TYPE_INT, { .i64 = 16 }, 6, INT_MAX, FLAGS }
|
OFFSET(num_output_buffers), AV_OPT_TYPE_INT, { .i64 = 16 }, 2, INT_MAX, FLAGS }
|
||||||
|
|
||||||
typedef struct V4L2m2mContext {
|
typedef struct V4L2m2mContext {
|
||||||
char devname[PATH_MAX];
|
char devname[PATH_MAX];
|
||||||
|
@ -226,7 +226,7 @@ static av_cold int v4l2_decode_close(AVCodecContext *avctx)
|
|||||||
static const AVOption options[] = {
|
static const AVOption options[] = {
|
||||||
V4L_M2M_DEFAULT_OPTS,
|
V4L_M2M_DEFAULT_OPTS,
|
||||||
{ "num_capture_buffers", "Number of buffers in the capture context",
|
{ "num_capture_buffers", "Number of buffers in the capture context",
|
||||||
OFFSET(num_capture_buffers), AV_OPT_TYPE_INT, {.i64 = 20}, 20, INT_MAX, FLAGS },
|
OFFSET(num_capture_buffers), AV_OPT_TYPE_INT, {.i64 = 20}, 2, INT_MAX, FLAGS },
|
||||||
{ NULL},
|
{ NULL},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user