[SCM] libav/experimental: move free data in the video case

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:45:34 UTC 2013


The following commit has been merged in the experimental branch:
commit 24ac50525a219d5451f5cd712a4557dcca50198a
Author: Baptiste Coudurier <baptiste.coudurier at gmail.com>
Date:   Mon May 11 02:36:57 2009 +0000

    move free data in the video case
    
    Originally committed as revision 18793 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 82fbd9a..0d6436e 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -741,6 +741,7 @@ static int mpegts_write_packet(AVFormatContext *s, AVPacket *pkt)
         st->codec->codec_type == CODEC_TYPE_VIDEO) {
         // for video and subtitle, write a single pes packet
         mpegts_write_pes(s, st, buf, size, pts, dts);
+        av_free(data);
         return 0;
     }
 
@@ -769,8 +770,6 @@ static int mpegts_write_packet(AVFormatContext *s, AVPacket *pkt)
         }
     }
 
-    av_free(data);
-
     return 0;
 }
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list