flvdec: Check the return value of a malloc
authorMartin Storsjö <martin@martin.st>
Fri, 1 Mar 2013 14:45:24 +0000 (16:45 +0200)
committerReinhard Tartler <siretart@tauware.de>
Sat, 2 Mar 2013 08:55:33 +0000 (09:55 +0100)
commitefa8603518258aa992752e0589d8fdd7b7d1f66b
tree9d8661bec803125f3c8b1bb5b8618b53f619ad49
parent1b0082eabcc98e079d33c61da4d30ded89de68a9
flvdec: Check the return value of a malloc

The callers of this function can't report errors sanely. If this
one malloc fails, don't write the extradata byte, make sure we
try to malloc it the next time we're called instead, and make sure
we still consume the input data byte.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit c5a738ca4e9789b4678b10240777d931e7dc24c9)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
libavformat/flvdec.c