[FFmpeg-devel] [PATCH] avformat/mxf: Establish register of local tags

Paul B Mahol onemda at gmail.com
Tue Feb 2 13:58:41 EET 2021


I think you should make tables that never change const.

On Tue, Feb 2, 2021 at 12:11 AM Tomas Härdin <tjoppen at acc.umu.se> wrote:

> mån 2021-02-01 klockan 11:37 +0100 skrev Tomas Härdin:
> > fre 2021-01-29 klockan 22:06 +0100 skrev Marton Balint:
> > > On Thu, 28 Jan 2021, Tomas Härdin wrote:
> > >
> > > > tor 2021-01-28 klockan 14:48 +0100 skrev Tomas Härdin:
> > > > > tor 2021-01-28 klockan 08:56 +0100 skrev Marton Balint:
> > > > > > On Thu, 28 Jan 2021, Tomas Härdin wrote:
> > > > > > > ons 2021-01-27 klockan 23:50 +0100 skrev Marton Balint:
> > > > > > > > On Wed, 27 Jan 2021, Tomas Härdin wrote:
> > > > > > > There's not really anything to av_assert0() on in
> > > > > > > mxf_lookup_local_tag(). Either way, I'm thinking replacing the
> return
> > > > > > > NULL with either
> > > > > > >
> > > > > > >    av_log(NULL, AV_LOG_PANIC, "Tried to use unregistered local
> tag
> > > > > > > 0x%04x\n", tag);
> > > > > > >    abort();
> > > > > > >
> > > > > > > or
> > > > > > >
> > > > > > >    av_assert0(0 && "Tried to use unregistered local tag");
> > > > > > >
> > > > > > > or maybe
> > > > > > >
> > > > > > >    av_log(NULL, AV_LOG_PANIC, "Tried to use unregistered local
> tag
> > > > > > > 0x%04x\n", tag);
> > > > > > >    av_assert0(0);
> > > > > > >
> > > > > > > to avoid explicitly calling abort()
> > > > > >
> > > > > > I think we usually do av_assert0(0) in this case. I am not sure
> if the
> > > > > > error message is particularly useful, afterall who sees it
> should be a
> > > > > > programmer and file/line is printed by assert anyway, so a
> comment in the
> > > > > > source code before the assert makes more sense to me.
> > > > >
> > > > > Maybe av_assert0(0 && "you forgot to add a local tag to the
> registry")?
> > > >
> > > > Here's a rebased patch that does this, with a little comment also
> > >
> > > LGTM, thanks.
> >
> > Will push later today
>
> Pushed
>
> /Tomas
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list