X-Git-Url: https://rtime.felk.cvut.cz/gitweb/frescor/ffmpeg.git/blobdiff_plain/7a4c7353e3328152c5f8179a9314cbbeaf249623..fc01afc1493e3252c3ae7550923d2b28a63e16ca:/libavformat/mpegtsenc.c diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index 82fbd9abe..0d6436eb1 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; }