On 01/19/2012 03:55 PM, Måns Rullgård wrote: > Justin Ruggles <[email protected]> writes: > >> From: Michael Niedermayer <[email protected]> >> >> This is safer >> >> Signed-off-by: Michael Niedermayer <[email protected]> >> Signed-off-by: Justin Ruggles <[email protected]> >> --- >> 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 [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
