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

Michael Niedermayer michaelni
Mon May 17 15:23:09 CEST 2010


On Sun, May 16, 2010 at 05:04:50PM -0700, John Stebbins wrote:
> 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.
> 

[...]
> -            while(index>0 && st2->index_entries[index].pos > pos)
> -                index--;
> -            while(index+1 < st2->nb_index_entries && st2->index_entries[index].pos < pos)
> -                index++;
[...]
> +                while(index>0 && st2->index_entries[index].pos > pos)
> +                    index--;
> +                while(index+1 < st2->nb_index_entries && st2->index_entries[index].pos < pos)
> +                    index++;

this is a cosmetic change and requires to be in a patch without
functional changes


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100517/64509825/attachment.pgp>



More information about the ffmpeg-devel mailing list