[FFmpeg-devel] [PATCH 4/4] lavc/mpeg4videodec: fix can't dump AVOptions issue.

Jun Zhao mypopydev at gmail.com
Mon Aug 13 16:51:47 EEST 2018


fix can't dump the mpeg4videodec option with the command
"ffmpeg -h decoder=mpeg4".

Signed-off-by: Jun Zhao <mypopydev at gmail.com>
---
 libavcodec/mpeg4videodec.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 24c280d..549b7a5 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -3435,9 +3435,10 @@ static av_cold int decode_end(AVCodecContext *avctx)
     return ff_h263_decode_end(avctx);
 }
 
+#define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
 static const AVOption mpeg4_options[] = {
-    {"quarter_sample", "1/4 subpel MC", offsetof(MpegEncContext, quarter_sample), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, 0},
-    {"divx_packed", "divx style packed b frames", offsetof(MpegEncContext, divx_packed), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, 0},
+    {"quarter_sample", "1/4 subpel MC", offsetof(MpegEncContext, quarter_sample), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, VD},
+    {"divx_packed", "divx style packed b frames", offsetof(MpegEncContext, divx_packed), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, VD},
     {NULL}
 };
 
-- 
1.7.1



More information about the ffmpeg-devel mailing list