> On Apr 3, 2022, at 1:07 PM, Eran Kornblau <eran.kornb...@kaltura.com> wrote: > > Trying my luck in a new thread… > > This patch is in continuation to this discussion – > https://ffmpeg.org/pipermail/ffmpeg-devel/2022-March/294623.html > > supports forcing or disabling the writing of the btrt atom. > the default behavior is to write the atom only for mp4 mode. > --- > libavformat/movenc.c | 30 +++++++++++++++++++----------- > libavformat/movenc.h | 1 + > 2 files changed, 20 insertions(+), 11 deletions(-) > > diff --git a/libavformat/movenc.c b/libavformat/movenc.c > index 4c868919ae..b75f1c6909 100644 > --- a/libavformat/movenc.c > +++ b/libavformat/movenc.c > […] > > - if (track->mode == MODE_MP4 && > - ((ret = mov_write_btrt_tag(pb, track)) < 0)) > - return ret; > + if ((mov->write_btrt == -1 && track->mode == MODE_MP4) || > mov->write_btrt == 1) { > + if ((ret = mov_write_btrt_tag(pb, track)) < 0) { > + return ret; > + } > + }
I prefer to handle the auto mode (mov->write_btrt == -1) in a single place, so we don’t need to change multiple lines if the condition changed, e.g., enable btrt for MODE_MOV. Please correct me if I’m wrong, mov_init() has all of the contexts to overwrite mov->write_btrt. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".