[FFmpeg-devel] [PATCH 2/3] ffmpeg: free empty subtitles as well in transcode_subtitles

Marton Balint cus at passwd.hu
Sat Nov 23 17:58:14 CET 2013


Signed-off-by: Marton Balint <cus at passwd.hu>
---
 ffmpeg.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index ff39fe0..5ba9450 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1822,7 +1822,7 @@ static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output)
     sub2video_update(ist, &subtitle);
 
     if (!subtitle.num_rects)
-        return ret;
+        goto out;
 
     for (i = 0; i < nb_output_streams; i++) {
         OutputStream *ost = output_streams[i];
@@ -1833,6 +1833,7 @@ static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output)
         do_subtitle_out(output_files[ost->file_index]->ctx, ost, ist, &subtitle);
     }
 
+out:
     avsubtitle_free(&subtitle);
     return ret;
 }
-- 
1.8.4



More information about the ffmpeg-devel mailing list