aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/ffmpeg_demux.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2024-01-23 18:42:20 +0100
committerAnton Khirnov <anton@khirnov.net>2024-01-30 09:52:00 +0100
commitb27de18e4f66e8e775e173e4953f8fe4a7404a82 (patch)
tree25c5011175fd60b263443b85ea5adb1a0f38565f /fftools/ffmpeg_demux.c
parent052c83e356e8716643e0475ed3b23901310d27ce (diff)
downloadffmpeg-b27de18e4f66e8e775e173e4953f8fe4a7404a82.tar.gz
fftools/ffmpeg_dec: move setting compute_edt to demuxer
It is done based on demuxer information, so that is the more appropriate place for this code. This is a step towards decoupling Decoder and InputStream.
Diffstat (limited to 'fftools/ffmpeg_demux.c')
-rw-r--r--fftools/ffmpeg_demux.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c
index 2a34f97545..7cb85c127a 100644
--- a/fftools/ffmpeg_demux.c
+++ b/fftools/ffmpeg_demux.c
@@ -913,6 +913,15 @@ static int ist_use(InputStream *ist, int decoding_needed)
} else
ds->dec_opts.framerate = ist->st->avg_frame_rate;
+ if (ist->dec->id == AV_CODEC_ID_DVB_SUBTITLE &&
+ (ist->decoding_needed & DECODING_FOR_OST)) {
+ av_dict_set(&ist->decoder_opts, "compute_edt", "1", AV_DICT_DONT_OVERWRITE);
+ if (ist->decoding_needed & DECODING_FOR_FILTER)
+ av_log(ist, AV_LOG_WARNING,
+ "Warning using DVB subtitles for filtering and output at the "
+ "same time is not fully supported, also see -compute_edt [0|1]\n");
+ }
+
ret = dec_open(ist, d->sch, ds->sch_idx_dec,
&ist->decoder_opts, &ds->dec_opts);
if (ret < 0)