[FFmpeg-devel] [PATCH] Only using st->parser->pos when doing repacking in the parser.

Michael Niedermayer michaelni at gmx.at
Tue May 10 03:24:28 CEST 2011


On Mon, May 09, 2011 at 08:42:22AM +0200, Reimar Döffinger wrote:
> On Sun, May 08, 2011 at 12:27:39AM +0200, Michael Niedermayer wrote:
> > the ea case is fixed by my suggestion of
> > index 4a4141e..c60d27f 100644
> > --- a/libavformat/utils.c
> > +++ b/libavformat/utils.c
> > @@ -1103,7 +1103,7 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
> > 
> >                      if((s->iformat->flags & AVFMT_GENERIC_INDEX) && pkt->flags & AV_PKT_FLAG_KEY){
> >                          ff_reduce_index(s, st->index);
> > -                        av_add_index_entry(st, st->parser->frame_offset, pkt->dts,
> > +                        av_add_index_entry(st, pkt->pos, pkt->dts,
> >                                             0, 0, AVINDEX_KEYFRAME);
> >                      }
> 
> Sorry, I was being stupid. I think this actually does what I attempted
> to do in my previous patch without fiddling with internals.
> For some reason I was convinced that parser->pos had the same fiddling
> applied as st->parser->frame_offset.
> Could you push this (or to avoid changes to existing behaviour, this with
> an additional condition so st->parser->frame_offset is still used if
> e.g. COMPLETE_FRAMES is not set or a similar condition)?

done locally will push

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

No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110510/b96cb931/attachment.asc>


More information about the ffmpeg-devel mailing list