aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Gehrer <stefan.gehrer@gmx.de>2009-02-24 15:56:53 +0000
committerStefan Gehrer <stefan.gehrer@gmx.de>2009-02-24 15:56:53 +0000
commitcd3356ff73bb9ed2ee0190a1d240adcb6d5e9864 (patch)
treedbd7ccb0bb923c68bce2b64a5029121519c4e388
parent88db5551cf1ced4ea3e5e8bd5b684d2dc74b1ed2 (diff)
downloadffmpeg-cd3356ff73bb9ed2ee0190a1d240adcb6d5e9864.tar.gz
check for a stuffing byte at the end of a slice
Originally committed as revision 17559 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/cavsdec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index d0c6bee347..a1895bcb88 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -439,6 +439,9 @@ static inline int check_for_slice(AVSContext *h) {
if(h->mbx)
return 0;
align = (-get_bits_count(gb)) & 7;
+ /* check for stuffing byte */
+ if(!align && (show_bits(gb,8) == 0x80))
+ get_bits(gb,8);
if((show_bits_long(gb,24+align) & 0xFFFFFF) == 0x000001) {
skip_bits_long(gb,24+align);
h->stc = get_bits(gb,8);