On Wed, Sep 11, 2013 at 11:47:59PM +0300, Martin Storsjö wrote: > --- a/libavcodec/avpacket.c > +++ b/libavcodec/avpacket.c > @@ -68,7 +68,7 @@ static int packet_alloc(AVBufferRef **buf, int size) > > av_buffer_realloc(buf, size + FF_INPUT_BUFFER_PADDING_SIZE); > - if (!buf) > + if (!*buf) > return AVERROR(ENOMEM);
av_buffer_realloc() returns a negative AVERROR on failure. It would seem safer to check that instead of the pointer, as is done in other places. If I read the code correctly, av_buffer_realloc may fail w/o setting buf to NULL. Diego _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
