[Libav-user] setting flags into AVInputFormat and AVOutputFormat

peks ge6kov pezalot at gmail.com
Tue Apr 9 12:06:50 EEST 2024


Hello libav team.

I have to migrate ffmpeg from 4.4.4 to 5.1.4 but I met issues trying 
setting flags to AVOutputFormat and AVInputFormat. In my code with 
oldest 4.4.4 version I do something like this and works fine:

....

ifmt_ctx->flags|=AVFMT_FLAG_NONBLOCK|AVFMT_FLAG_GENPTS|AVFMT_FLAG_DISCARD_CORRUPT;

....

ifmt_ctx->iformat->flags |= AVFMT_TS_DISCONT;

....

ofmt_ctx->flags|= 
AVFMT_FLAG_GENPTS|AVFMT_FLAG_NONBLOCK|AVFMT_FLAG_DISCARD_CORRUPT;

.....

ofmt_ctx->oformat->flags |= 
AVFMT_GLOBALHEADER|AVFMT_NOTIMESTAMPS|AVFMT_TS_NONSTRICT;


Ok, when I switch to 5.1.4 there is change in struct reference 
AVFormatContext.iformat and  AVFormatContext.oformat fields now are const

My willing is to set this flags according this change programmatically, 
how can I do that?






More information about the Libav-user mailing list