[FFmpeg-cvslog] r12894 - in trunk/libavcodec: aac_ac3_parser.c aac_ac3_parser.h aac_parser.c ac3_parser.c

Justin Ruggles justin.ruggles
Mon Sep 22 02:36:17 CEST 2008


Michael Niedermayer wrote:
> On Fri, Sep 19, 2008 at 06:20:30PM -0400, Justin Ruggles wrote:
>> Janne Grunau wrote:
>>> On Saturday 19 April 2008 03:50:41 michael wrote:
>>>> Author: michael
>>>> Date: Sat Apr 19 03:50:40 2008
>>>> New Revision: 12894
>>>>
>>>> Log:
>>>> Change aac and ac3 parsers to use ff_combine_frame().
>>> this breaks parsing of some AC3 streams. For example 
>>> ac3_parsing_errors_rev12894.mpg in incoming.
>>>
>>> I'm not sure if this is the actual changeset which is to blame. It is 
>>> the first which introduces
>>> "frame sync error" and "incomplete frame" messages. But those are only 
>>> at the start of the file while the beeps with current trunk are later 
>>> in the file.
>>>
>>> Playback of that sample is broken from 13579 til 13653. Revision 13654 
>>> fixes playback but introduces nasty beeps after each frame sync error.
>>>
>>> Janne
>> I am aware of the issue, and I'm pretty sure I know what's causing it,
>> but I'm not quite sure how to fix it.  It seems to be occuring when the
>> first bytes of a frame header are at the end of the buffer.  The next
>> parser call then has the start of frame as negative, which doesn't seem
>> to work well with ff_combine_frame().  There was a patch which fixed the
>> error messages, but didn't fix the problem because the 2 frames end up
>> being sent in the same packet.
> 
> Does the following fix it? [if not i need a testcase that fails with it]
> 
> @@ -51,7 +56,7 @@
>              }else{
>                  i-= s->header_size -1;
>                  s->remaining_size = len;
> -                if(!new_frame_start){
> +                if(!new_frame_start || pc->index+i<=0){
>                      s->remaining_size += i;
>                      goto get_next;
>                  }

This fixes all the recent problems I have run into with the AC3 parser,
including issue 459.

Thanks!
Justin





More information about the ffmpeg-cvslog mailing list