[FFmpeg-devel] [PATCH 1/6] ffmpeg: call sub2video_update for end packets.

Nicolas George nicolas.george at normalesup.org
Sun Sep 9 16:50:15 CEST 2012


Without that change, all subtitles will stay until the next one.

Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
---
 ffmpeg.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 2763db6..e495da8 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1678,13 +1678,13 @@ static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output)
         FFSWAP(AVSubtitle, subtitle,    ist->prev_sub.subtitle);
     }
 
+    sub2video_update(ist, &subtitle, pkt->pts);
+
     if (!*got_output || !subtitle.num_rects)
         return ret;
 
     rate_emu_sleep(ist);
 
-    sub2video_update(ist, &subtitle, pkt->pts);
-
     for (i = 0; i < nb_output_streams; i++) {
         OutputStream *ost = output_streams[i];
 
-- 
1.7.10.4



More information about the ffmpeg-devel mailing list