avpacket: Fix error checking in packet_alloc
authorMartin Storsjö <martin@martin.st>
Wed, 11 Sep 2013 20:09:37 +0000 (23:09 +0300)
committerMartin Storsjö <martin@martin.st>
Mon, 16 Sep 2013 08:22:42 +0000 (11:22 +0300)
commit85e8192b8593816c0445411a5bef5fc5363a9b6d
tree3ddfcb7b8eecbff73df9fcd6ff0e72d7d62cee45
parent6fc8226e29055858f28973bb3d27b63b3b65e616
avpacket: Fix error checking in packet_alloc

Previously the wrong buffer pointer was checked, when buf
instead of *buf was checked. But checking the return value
instead is even better.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
libavcodec/avpacket.c