changeset 6644:1d9eb7c09f98 libavcodec

part 1 of EAC3 support
author michael
date Sat, 19 Apr 2008 02:28:24 +0000
parents 4d04fcb5e1e4
children 83f805f7a854
files aac_ac3_parser.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/aac_ac3_parser.c	Sat Apr 19 01:59:55 2008 +0000
+++ b/aac_ac3_parser.c	Sat Apr 19 02:28:24 2008 +0000
@@ -33,9 +33,10 @@
     int len, i;
     int new_frame_start;
 
+get_next:
     i=END_NOT_FOUND;
     if(s->remaining_size <= buf_size){
-        if(s->remaining_size){
+        if(s->remaining_size && !s->need_next_header){
             i= s->remaining_size;
             s->remaining_size = 0;
         }else{ //we need a header first
@@ -50,6 +51,8 @@
             }else{
                 i-= s->header_size -1;
                 s->remaining_size = len + i;
+                if(!new_frame_start)
+                    goto get_next;
             }
         }
     }