[FFmpeg-devel] regarding hiding AVStream.first_dts member into AVStreamInternal
James Almer
jamrial at gmail.com
Thu Sep 16 16:41:45 EEST 2021
Chromium could instead keep track of that timestamp in their own code.
It's what i did to remove the internal fields usage from our CLI tools.
See https://github.com/FFmpeg/FFmpeg/commit/ab4f299e23
On 9/16/2021 8:24 AM, Marek Behún wrote:
> Hello James, liberato,
>
> James, your commit 591b88e6787c [1] in FFmpeg hid the first_dts and
> cur_dts members of AVStream structure into the internal member, making
> them inaccessible from third party code.
>
> The reasoning in the commit message says:
> They are private fields, no reason to have them exposed in a public
> header.
>
> But the first_dts member is used in Chromium, in
> media/filters/ffmpeg_demuxer.cc [2] in method FFmpegDemuxer::InitializeTask.
>
> Chromium solved this by adding av_stream_get_first_dts() method into
> their bundled ffmpeg copy [3].
>
> This makes it now impossible to link Chromium with system-ffmpeg, which
> was till now a possibility in Gentoo, and which we would like to have
> also in the future.
>
> James, what do you think the best approach is here?
> Should the FFmpeg commit be reverted to unhide this member?
> Or should Chromium be fixed not to use this member? (I confess I did
> not study the code much, so I don't know why it is needed, besides that
> Chromium tries to compute start_time_ variable with it.)
>
> Thank you.
>
> Marek
>
> [1] https://github.com/FFmpeg/FFmpeg/commit/591b88e6787c
>
> [2]
> https://chromium.googlesource.com/chromium/+/refs/heads/trunk/media/filters/ffmpeg_demuxer.cc
>
> [3]
> https://chromium.googlesource.com/chromium/third_party/ffmpeg/+/95aab0fd83619408995720ce53d7a74790580220%5E%21/
>
More information about the ffmpeg-devel
mailing list