The user should not rely on all options always being recognized (in particular not on error).
Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> --- doc/examples/extract_mvs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/examples/extract_mvs.c b/doc/examples/extract_mvs.c index 42e1844150..f5d2fd9179 100644 --- a/doc/examples/extract_mvs.c +++ b/doc/examples/extract_mvs.c @@ -104,7 +104,9 @@ static int open_codec_context(AVFormatContext *fmt_ctx, enum AVMediaType type) /* Init the video decoder */ av_dict_set(&opts, "flags2", "+export_mvs", 0); - if ((ret = avcodec_open2(dec_ctx, dec, &opts)) < 0) { + ret = avcodec_open2(dec_ctx, dec, &opts); + av_dict_free(&opts); + if (ret < 0) { fprintf(stderr, "Failed to open %s codec\n", av_get_media_type_string(type)); return ret; -- 2.27.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".