[Libav-user] What happens if AV_CODEC_FLAG_GLOBAL_HEADER is set when not needed.

Hristo Ivanov hivanov.ffmailing at gmail.com
Tue Jun 19 18:42:45 EEST 2018


Hi.

I am looking into encoding once but writing to multiple files with
different formats.

For some formats the encoder must be configured with the
AV_CODEC_FLAG_GLOBAL_HEADER flag active, like this:

if (ofmt_ctx->oformat->flags & AVFMT_GLOBALHEADER)
    enc_ctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;


My problem comes when having to encode for two formats, one that needs the
flag and one that does not.

I know that not setting the flags for the formats that need it, is not an
option. Since this produced files not playable by most players.

What happens when the flags is set for formats that does not need it?

Will forcing the flag to be always true fix my problem?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20180619/5e836da6/attachment.html>


More information about the Libav-user mailing list