[FFmpeg-devel] [PATCH] mpegtsenc: fix free of adts when not using AAC

Clément Bœsch ubitux at gmail.com
Wed Oct 12 21:53:06 CEST 2011


On Wed, Oct 12, 2011 at 02:11:01PM -0500, Chris Kennedy wrote:
[...]
> diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
> index 1eb935c..1419af0 100644
> --- a/libavformat/mpegtsenc.c
> +++ b/libavformat/mpegtsenc.c
> @@ -1063,7 +1063,8 @@ static int mpegts_write_end(AVFormatContext *s)
>                               ts_st->payload_pts, ts_st->payload_dts,
>                               ts_st->payload_flags & AV_PKT_FLAG_KEY);
>          }
> -        av_freep(&ts_st->adts);
> +        if (ts_st->adts)
> +            av_freep(&ts_st->adts);
>      }

This won't fix anything, the check is pointless since free(NULL) is
valid.


-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111012/5527561f/attachment.asc>


More information about the ffmpeg-devel mailing list