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)
committerSean McGovern <gseanmcg@gmail.com>
Mon, 23 Sep 2013 23:14:14 +0000 (19:14 -0400)
commit729143e2d27d5f06e6c4b959f4808a8a5fa7ca25
tree99f0c2686be38622e47e3a18152fc81e45d8742b
parent36921fcdd3613dedd4046b59e3f43024fbfbbe17
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