summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg4audio.c
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2010-04-08 06:04:37 +0000
committerAlex Converse <alex.converse@gmail.com>2010-04-08 06:04:37 +0000
commit37216b99e090a88d98be57a8aab14a8316b96a71 (patch)
tree8a4a14c4ac68e07290ab0276f574cdc575558471 /libavcodec/mpeg4audio.c
parent702b73bc9f02ab9a0db373c19d28284e19498aa3 (diff)
downloadffmpeg-37216b99e090a88d98be57a8aab14a8316b96a71.tar.gz
Use get_bits_left() in the sync extension check.
Originally committed as revision 22817 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpeg4audio.c')
-rw-r--r--libavcodec/mpeg4audio.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/mpeg4audio.c b/libavcodec/mpeg4audio.c
index 1c78f84d31..7b5333d1c6 100644
--- a/libavcodec/mpeg4audio.c
+++ b/libavcodec/mpeg4audio.c
@@ -115,8 +115,7 @@ int ff_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, int buf_si
}
if (c->ext_object_type != AOT_SBR) {
- int bits_left = buf_size*8 - get_bits_count(&gb);
- for (; bits_left > 15; bits_left--) {
+ while (get_bits_left(&gb) > 15) {
if (show_bits(&gb, 11) == 0x2b7) { // sync extension
get_bits(&gb, 11);
c->ext_object_type = get_object_type(&gb);