# HG changeset patch # User bcoudurier # Date 1242009417 0 # Node ID 2647ebecc2f5b8bdbe9a151eb79a6902b06458e5 # Parent fa21da521576b800e5064d700dc30198ed7fb502 move free data in the video case diff -r fa21da521576 -r 2647ebecc2f5 mpegtsenc.c --- a/mpegtsenc.c Mon May 11 02:30:29 2009 +0000 +++ b/mpegtsenc.c Mon May 11 02:36:57 2009 +0000 @@ -741,6 +741,7 @@ 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 @@ } } - av_free(data); - return 0; }