[FFmpeg-devel] [RFC] Always set extradata, not only if CODEC_FLAG_GLOBAL_HEADER is set?
Tue Jan 8 10:45:38 CET 2008
Michael Niedermayer wrote:
> Currently several encoders set extradata only if CODEC_FLAG_GLOBAL_HEADER
> is set.
> CODEC_FLAG_GLOBAL_HEADER besides this also prevents the global headers from
> being placed before each keyframe.
> maybe we should always set extradata, this would be somewhat simpler and
> more consistant as many encoders use extradata without looking at
> CODEC_FLAG_GLOBAL_HEADER and shouldnt do any harm. (no change for muxers which
> dont support extradata)
> CODEC_FLAG_GLOBAL_HEADER would still be used to avoid global headers before
> The encoders affected are faac, x264, xvid and mpeg4
> Is there any case where setting extradata does harm?
I imagine this would cause problems with muxers switching behaviour in
case of extradata presence and user might not want to use the extradata one.
adtsenc.c does change his behaviour if extradata is present, and looking
at the code I suspect that if CODEC_FLAG_GLOBAL_HEADER is not set but
extradata is, it will write twice adts header. So muxer should be
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A. http://www.smartjog.com
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312
More information about the ffmpeg-devel