diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-09-01 04:13:49 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-09-01 19:51:58 +0200 |
commit | b01d2a5533a99cbd803159a4a7f365d12a0bc5c5 (patch) | |
tree | 05064c3a7dd3e4e44104724ec25f52ede08696b0 /ffmpeg.c | |
parent | a2dbf379f01b812ef96dc4d783025a1740572890 (diff) | |
download | ffmpeg-b01d2a5533a99cbd803159a4a7f365d12a0bc5c5.tar.gz |
ffmpeg: Enable compute_edt only when the subtitles are used for a output stream instead of a filter
Fixes/works around Ticket3768
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -2297,8 +2297,12 @@ static int init_input_stream(int ist_index, char *error, int error_len) ist->dec_ctx->thread_safe_callbacks = 1; av_opt_set_int(ist->dec_ctx, "refcounted_frames", 1, 0); - if(ist->dec_ctx->codec_id == AV_CODEC_ID_DVB_SUBTITLE) + if (ist->dec_ctx->codec_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(NULL, 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"); + } if (!av_dict_get(ist->decoder_opts, "threads", NULL, 0)) av_dict_set(&ist->decoder_opts, "threads", "auto", 0); @@ -2678,7 +2682,7 @@ static int transcode_init(void) } if (ist) - ist->decoding_needed++; + ist->decoding_needed |= DECODING_FOR_OST; ost->encoding_needed = 1; set_encoder_id(output_files[ost->file_index], ost); |