Mov demuxer first builds the index, containing all the samples and their
timestamps, in its read_header function. It then simply searches this index
for the required sample on every read_packet call, and constructs an
AVPacket out of that sample. Implementation wise the edit list code
basically parses all these edit lists once to mark the index samples which
are/are not in the edit lists, when we read the header. If I have to avoid
this I would have to move the quite complicated logic of deciding if the
current packet is  in any of the  edit lists or not and  the logic of
rewriting the timestamps, inside the read_packet function.

On Wed, Aug 10, 2016 at 5:08 AM, Hendrik Leppkes <h.lepp...@gmail.com>
wrote:

> On Wed, Aug 10, 2016 at 3:48 AM, Sasi Inguva
> <isasi-at-google....@ffmpeg.org> wrote:
> > Signed-off-by: Sasi Inguva <is...@google.com>
> > ---
> >  libavformat/avformat.h | 3 +++
> >  libavformat/version.h  | 2 +-
> >  2 files changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/libavformat/avformat.h b/libavformat/avformat.h
> > index d8a6cf3..8cf1401 100644
> > --- a/libavformat/avformat.h
> > +++ b/libavformat/avformat.h
> > @@ -814,6 +814,9 @@ typedef struct AVIndexEntry {
> >                                 * is known
> >                                 */
> >  #define AVINDEX_KEYFRAME 0x0001
> > +#define AVINDEX_DISCARD_FRAME  0x0002    /**
> > +                                          * Flag is used to indicate
> which frame should be discarded after decoding.
> > +                                          */
>
> Having this flag on the index seems ... odd. If I would expect to get
> it from anywhere, it would be the AVPacket the demuxer outputs (which
> you add later), but not having to cross-check the index for this.
> What purpose does it really server to have it here, and not only on
> AVPacket?
>
> - Hendrik
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to