[FFmpeg-devel] [PATCH] fftools/ffmpeg: store a separate copy of input codec parameters

Anton Khirnov anton at khirnov.net
Tue Aug 16 18:28:53 EEST 2022


Quoting James Almer (2022-08-16 14:21:31)
> On 8/13/2022 12:36 PM, Anton Khirnov wrote:
> > Use it instead of AVStream.codecpar in the main thread. While
> > AVStream.codecpar is documented to only be updated when the stream is
> > added or avformat_find_stream_info(), it is actually updated during
> > demuxing. Accessing it from a different thread then constitutes a race.
> 
> Should we consider a bug that some demuxers update stream's codepars 
> post init? Or is the documentation not reflecting the actual behavior 
> what's wrong?

Maybe? Disregarding the generic code we know about, I'd be interested to
know which demuxers modify codecpar and whether they have a good reason
for it.

I already know dv updates the timebase all the time, which should be
highly illegal.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list