Use new av_dict_set_int helper function.
Get rid of the many, slightly differing, implementations of basically the same thing. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This commit is contained in:
2
ffplay.c
2
ffplay.c
@@ -2582,7 +2582,7 @@ static int stream_component_open(VideoState *is, int stream_index)
|
||||
if (!av_dict_get(opts, "threads", NULL, 0))
|
||||
av_dict_set(&opts, "threads", "auto", 0);
|
||||
if (stream_lowres)
|
||||
av_dict_set(&opts, "lowres", av_asprintf("%d", stream_lowres), AV_DICT_DONT_STRDUP_VAL);
|
||||
av_dict_set_int(&opts, "lowres", stream_lowres, 0);
|
||||
if (avctx->codec_type == AVMEDIA_TYPE_VIDEO || avctx->codec_type == AVMEDIA_TYPE_AUDIO)
|
||||
av_dict_set(&opts, "refcounted_frames", "1", 0);
|
||||
if (avcodec_open2(avctx, codec, &opts) < 0)
|
||||
|
Reference in New Issue
Block a user