[FFmpeg-cvslog] lavf/segment: remove duplicated and inconsistent cleanup code in seg_write_packet()

Stefano Sabatini git at videolan.org
Tue Jan 21 20:10:54 CET 2014


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Tue Jan 21 19:58:41 2014 +0100| [169065fbfb3da1ab776379c333aebc54bb1f1bc4] | committer: Stefano Sabatini

lavf/segment: remove duplicated and inconsistent cleanup code in seg_write_packet()

In particular, avoid to leave around the seg->avf pointer to freed
structure, and fix crash with:
ffmpeg -f lavfi -i testsrc -c:v h264 -map 0 -f segment foo-%d.ts

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=169065fbfb3da1ab776379c333aebc54bb1f1bc4
---

 libavformat/segment.c |    6 ------
 1 file changed, 6 deletions(-)

diff --git a/libavformat/segment.c b/libavformat/segment.c
index 91c1432..bf5f4fb 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -731,12 +731,6 @@ fail:
     if (pkt->stream_index == seg->reference_stream_index)
         seg->frame_count++;
 
-    if (ret < 0) {
-        if (seg->list)
-            avio_close(seg->list_pb);
-        avformat_free_context(oc);
-    }
-
     return ret;
 }
 



More information about the ffmpeg-cvslog mailing list