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.
Marton
_______________________________________________
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".