[FFmpeg-devel] [PATCH] Seeking to beginning of avi file skips first audio packet

John Stebbins stebbins
Mon May 17 02:04:50 CEST 2010


On 05/16/2010 04:52 PM, Carl Eugen Hoyos wrote:
> John Stebbins <stebbins <at> jetheaddev.com> writes:
>
>   
>> Index: libavformat/avidec.c
>> ===================================================================
>> --- ffmpeg.orig/libavformat/avidec.c	(revision 22950)
>> +++ ffmpeg/libavformat/avidec.c	(working copy)
>>     
>   
>> +            }
>> +            else {
>>     
> Should be one line
>
>   
>> +                while(index>0 && st2->index_entries[index].pos > pos)
>> +                    index--;
>> +                while(index+1 < st2->nb_index_entries &&
>>     
> st2->index_entries[index].pos < pos)
>   
>> +                    index++;
>>     
> Please do not mix functional and cosmetic changes (= do not re-indent in your
> patch).
>
>
>   
I missed the thing with the else, thanks for pointing that out.  But I
don't understand your comment about cosmetic changes.  I only indented
where it was needed because of the added conditional.  The alternative
would be to have that chunk of code improperly indented after applying
the patch where it was properly indented before applying the patch.

Here's a fix for the else.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: avi-seek.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100516/8337be4f/attachment.asc>



More information about the ffmpeg-devel mailing list