ac3dec: Don't consume more data than the actual input packet size
authorMartin Storsjö <martin@martin.st>
Mon, 15 Jul 2013 08:28:46 +0000 (11:28 +0300)
committerLuca Barbato <lu_zero@gentoo.org>
Sat, 24 Aug 2013 10:11:57 +0000 (12:11 +0200)
commit9680f84a31fa97272777e43a9234eb20d6da5930
treea7b15aa6faf5fd2f5d888dd1059a838bb6b94d2c
parent505415b98599777f8951d3d86821f542e661e581
ac3dec: Don't consume more data than the actual input packet size

This was handled properly in the normal return case at the end
of the function, but not in this special case.

Returning a value larger than the input packet size can cause
problems for certain library users.

Returning the actual input buffer size unconditionally, since
it is not guaranteed that frame_size is set to a sensible
value at this point.

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

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavcodec/ac3dec.c