John Cox (12019-05-16):
> >> -    if (!ctx)
> >> +    if (!ctx || !(*ctx))
> >That would protect somebody stupid enough to call av_tx_uninit(NULL)
> >instead of av_tx_uninit(&var). A hard crass is completely warranted in
> >this case. An assert would be acceptable.
> Actually that is what the original code does.  What you appear to want
> is
> 
>   if (!*ctx)

Indeed.

It is for example what avfilter_link_free(), av_bsf_list_free(), etc.,
do. It correspond to a useful programming pattern. The current code is
clearly a mistake.

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: PGP signature

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

Reply via email to