[FFmpeg-devel] [PATCH 10/18] lavf: move AVStream.*index_entries* to AVStreamInternal

Hendrik Leppkes h.leppkes at gmail.com
Tue Nov 17 10:35:47 EET 2020


On Tue, Nov 17, 2020 at 1:46 AM James Almer <jamrial at gmail.com> wrote:
>
> On 11/16/2020 12:25 PM, Hendrik Leppkes wrote:
> > On Mon, Nov 16, 2020 at 4:20 PM James Almer <jamrial at gmail.com> wrote:
> >>
> >> On 11/16/2020 3:01 AM, Anton Khirnov wrote:
> >>> Quoting Xiang, Haihao (2020-11-16 06:16:55)
> >>>>
> >>>> This change breaks the compiling of gst-libav (
> >>>> https://gitlab.freedesktop.org/gstreamer/gst-libav), I filed
> >>>> https://trac.ffmpeg.org/ticket/8988 to track this regression.
> >>>
> >>> This is not a regression, it's a bug in gst-libav. These fields are
> >>> private and have always been private, applications accessing them are
> >>> broken.
> >>
> >> Looking at that ticket, it seems gst-libav wants the timestamp for a
> >> given index entry. Unless this can already be achieved in some other
> >> way, it could maybe be implemented cleanly with a new public function
> >> (We have av_index_search_timestamp() to fetch an index from a timestamp
> >> after all).
> >
> > I also like being able to access the index, it can be used by players
> > to efficiently offer seeking straight to keyframes (eg. index
> > entries), which basically requires iterating over the full index and
> > getting the full information (timestamp, flags at least)
> >
> > - Hendrik
>
> What do you suggest, implement something like what you added to you
> LAVFilters fork? I don't know if returning a pointer to a given
> AVIndexEntry is ideal. If that were the case, then it wouldn't be an
> internal field.
>

I agree that just giving out the field is not a good public API, but I
just needed a quick fix. :)
A proper get_count + accessor that takes the index is much more
sensible, as you suggested.

- Hendrik


More information about the ffmpeg-devel mailing list