diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2009-11-16 17:42:43 +0000 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2009-11-16 17:42:43 +0000 |
commit | 6e44ba15504c05adb4ba610d83205bb7c499fb58 (patch) | |
tree | 910661d34317012741c036fa07b4fc5f20026bc6 /libavcodec/h263dec.c | |
parent | 830628e11caa35306fb214fb890e6c0c481fd6c8 (diff) | |
download | ffmpeg-6e44ba15504c05adb4ba610d83205bb7c499fb58.tar.gz |
Use get_bits_left() instead of size_in_bits - get_bits_count().
Originally committed as revision 20543 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h263dec.c')
-rw-r--r-- | libavcodec/h263dec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index c158436574..d75904cec4 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -268,8 +268,8 @@ static int decode_slice(MpegEncContext *s){ /* try to detect the padding bug */ if( s->codec_id==CODEC_ID_MPEG4 && (s->workaround_bugs&FF_BUG_AUTODETECT) - && s->gb.size_in_bits - get_bits_count(&s->gb) >=0 - && s->gb.size_in_bits - get_bits_count(&s->gb) < 48 + && get_bits_left(&s->gb) >=0 + && get_bits_left(&s->gb) < 48 // && !s->resync_marker && !s->data_partitioning){ @@ -300,7 +300,7 @@ static int decode_slice(MpegEncContext *s){ // handle formats which don't have unique end markers if(s->msmpeg4_version || (s->workaround_bugs&FF_BUG_NO_PADDING)){ //FIXME perhaps solve this more cleanly - int left= s->gb.size_in_bits - get_bits_count(&s->gb); + int left= get_bits_left(&s->gb); int max_extra=7; /* no markers in M$ crap */ @@ -325,7 +325,7 @@ static int decode_slice(MpegEncContext *s){ } av_log(s->avctx, AV_LOG_ERROR, "slice end not reached but screenspace end (%d left %06X, score= %d)\n", - s->gb.size_in_bits - get_bits_count(&s->gb), + get_bits_left(&s->gb), show_bits(&s->gb, 24), s->padding_bug_score); ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (AC_END|DC_END|MV_END)&part_mask); |