changeset 11587:d80d54dd267d libavcodec

Use get_bits_left() in the sync extension check.
author alexc
date Thu, 08 Apr 2010 06:04:37 +0000
parents 2dc5036a8d18
children 480a999ce2c4
files mpeg4audio.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mpeg4audio.c	Thu Apr 08 06:04:31 2010 +0000
+++ b/mpeg4audio.c	Thu Apr 08 06:04:37 2010 +0000
@@ -115,8 +115,7 @@
     }
 
     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);