[FFmpeg-cvslog] r11621 - trunk/libavformat/mov.c
Måns Rullgård
mans
Mon Jan 28 01:38:16 CET 2008
Michael Niedermayer <michaelni at gmx.at> writes:
>> > it creates race conditions with threads
>>
>> No.
>
> If you set a RESET_CODEC flag in an AVPacket and update
> codec_id width/height/extradata in AVCodecContext from the demuxer then the
> decoder which can run in a seperate thread (see ffplay) will have these
> values change below its fingers while still having older AVPackets to
> decode
>
> so, there is a race condition
That's only a race condition if you allow the demuxer to mess with the
codec parameters. It's not an inherent, unsolvable race condition.
The proper way of handling any such change is to emit a packet
describing what changed. Whatever comes next in the processing
pipeline can then pick it up and apply the changes at the right point.
>> > breaks ALL remuxing (even to mov)
>>
>> No it does not break anything, if it's done well.
>> Now don't even try to remux this stream into any other container not
>> supporting this feature, this would be pointless, and real stream copy
>> in mov case is to remux the whole stream in one track, not splitting them.
>
> its not pointless to remux one of the streams (for example the svq1 one
> droping the rpza)
> with multiple AVStreams thats just works
Your suggestion still breaks your very own ever-precious, completely
lossless stream copy to the same container.
> It is dangerous to be right in matters on which the established authorities
> are wrong. -- Voltaire
You're starting to sound and behave more and more as though you were
one of these "established authorities", and I'm not liking it.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-cvslog
mailing list