[FFmpeg-devel] [PATCH 4/4] ffmpeg: always fix subtitle duration of codecs with CODEC_CAP_SUBS_NO_TIME_OVERLAP flag
Marton Balint
cus at passwd.hu
Sun Nov 17 15:15:02 CET 2013
This fixes subtitle timings when converting teletext subtitles to srt.
Signed-off-by: Marton Balint <cus at passwd.hu>
---
ffmpeg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index 6aafdea..fd46224 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1790,7 +1790,7 @@ static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output)
return ret;
}
- if (ist->fix_sub_duration) {
+ if (ist->fix_sub_duration || ist->st->codec->codec->capabilities & CODEC_CAP_SUBS_NO_TIME_OVERLAP) {
if (ist->prev_sub.got_output) {
int end = av_rescale(subtitle.pts - ist->prev_sub.subtitle.pts,
1000, AV_TIME_BASE);
--
1.8.4
More information about the ffmpeg-devel
mailing list