[FFmpeg-cvslog] avcodec/dvbsubdec: make compute_edt user settable

Michael Niedermayer git at videolan.org
Mon Sep 1 20:28:46 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Sep  1 04:13:48 2014 +0200| [a2dbf379f01b812ef96dc4d783025a1740572890] | committer: Michael Niedermayer

avcodec/dvbsubdec: make compute_edt user settable

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a2dbf379f01b812ef96dc4d783025a1740572890
---

 ffmpeg.c               |    2 +-
 libavcodec/dvbsubdec.c |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index ff7961f..8bca9e7 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2298,7 +2298,7 @@ static int init_input_stream(int ist_index, char *error, int error_len)
 
         av_opt_set_int(ist->dec_ctx, "refcounted_frames", 1, 0);
         if(ist->dec_ctx->codec_id == AV_CODEC_ID_DVB_SUBTITLE)
-            av_dict_set(&ist->decoder_opts, "compute_edt", "1", 0);
+            av_dict_set(&ist->decoder_opts, "compute_edt", "1", AV_DICT_DONT_OVERWRITE);
 
         if (!av_dict_get(ist->decoder_opts, "threads", NULL, 0))
             av_dict_set(&ist->decoder_opts, "threads", "auto", 0);
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index 4cf5b02..097597e 100644
--- a/libavcodec/dvbsubdec.c
+++ b/libavcodec/dvbsubdec.c
@@ -1585,8 +1585,9 @@ end:
     return p - buf;
 }
 
+#define DS AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_SUBTITLE_PARAM
 static const AVOption options[] = {
-    {"compute_edt", "compute end of time using pts or timeout", offsetof(DVBSubContext, compute_edt), FF_OPT_TYPE_INT, {.i64 = 0}, 0, 1, 0},
+    {"compute_edt", "compute end of time using pts or timeout", offsetof(DVBSubContext, compute_edt), FF_OPT_TYPE_INT, {.i64 = 0}, 0, 1, DS},
     {NULL}
 };
 static const AVClass dvbsubdec_class = {



More information about the ffmpeg-cvslog mailing list