On Thu, 12 Sep 2013, Diego Biurrun wrote:
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.
That's probably a better option. I'd still like to have an ack from Anton on this matter though.
// Martin
_______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
