[FFmpeg-devel] [PATCH 2/4] ffmpeg: never output subtitles with zero duration

Marton Balint cus at passwd.hu
Sun Nov 17 15:15:00 CET 2013


Signed-off-by: Marton Balint <cus at passwd.hu>
---
 ffmpeg.c               | 2 +-
 tests/ref/fate/sub-srt | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index b2cebb8..6aafdea 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1808,7 +1808,7 @@ static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output)
 
     sub2video_update(ist, &subtitle);
 
-    if (!*got_output || !subtitle.num_rects)
+    if (!*got_output || !subtitle.num_rects || !(subtitle.end_display_time - subtitle.start_display_time))
         return ret;
 
     for (i = 0; i < nb_output_streams; i++) {
diff --git a/tests/ref/fate/sub-srt b/tests/ref/fate/sub-srt
index ba5e50a..012d475 100644
--- a/tests/ref/fate/sub-srt
+++ b/tests/ref/fate/sub-srt
@@ -1 +1 @@
-a246a00ed72655cb8db3eaf64a522e0d
+73d62f84a94c148014c97363efd4e0f8
-- 
1.8.4



More information about the ffmpeg-devel mailing list