On 01/19/2012 03:55 PM, Måns Rullgård wrote: > Justin Ruggles <justin.rugg...@gmail.com> writes: > >> From: Michael Niedermayer <michae...@gmx.at> >> >> This is safer >> >> Signed-off-by: Michael Niedermayer <michae...@gmx.at> >> Signed-off-by: Justin Ruggles <justin.rugg...@gmail.com> >> --- >> libavcodec/utils.c | 8 ++++---- >> 1 files changed, 4 insertions(+), 4 deletions(-) >> >> @@ -313,7 +313,7 @@ static int audio_get_buffer(AVCodecContext *avctx, >> AVFrame *frame) >> if (buf->extended_data[0] && buf_size > buf->audio_data_size) { >> av_free(buf->extended_data[0]); >> if (buf->extended_data != buf->data) >> - av_free(&buf->extended_data); >> + av_freep(&buf->extended_data); >> buf->extended_data = NULL; > > Setting it to NULL twice is safer? >
Uh, no. And really the only one here that's actually safer is the one in avcodec_fill_audio_frame(). -Justin _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel