aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-11-26 08:56:10 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-11-26 08:56:10 +0000
commite4828c7d43a686a7a91c91ab3e5f47fcc6c2bdc6 (patch)
tree15d009fb963e2640cdef7f6e20fe51f6a75029cf /libavcodec
parent9c938e77e825b69346137a37f06a4859ab561e41 (diff)
downloadffmpeg-e4828c7d43a686a7a91c91ab3e5f47fcc6c2bdc6.tar.gz
fixing h263+ slices if the padding at the end of the frame is >7 && <16 && there are no zero bytes afterwards
Originally committed as revision 1281 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h263.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/h263.c b/libavcodec/h263.c
index 08ad2c293e..0083ca280a 100644
--- a/libavcodec/h263.c
+++ b/libavcodec/h263.c
@@ -3292,14 +3292,14 @@ end:
return SLICE_END;
}
}else{
- if(get_bits_count(&s->gb) + 7 >= s->gb.size*8){
- int v= show_bits(&s->gb, 8) >> (((get_bits_count(&s->gb)-1)&7)+1);
- if(v==0)
- return SLICE_END;
- }else{
- if(show_bits(&s->gb, 16)==0)
- return SLICE_END;
+ int v= show_bits(&s->gb, 16);
+
+ if(get_bits_count(&s->gb) + 16 > s->gb.size*8){
+ v>>= get_bits_count(&s->gb) + 16 - s->gb.size*8;
}
+
+ if(v==0)
+ return SLICE_END;
}
return SLICE_OK;