[FFmpeg-devel] [PATCH]Avoid an assertion failure in ff_init_vlc_sparse
Carl Eugen Hoyos
cehoyos at ag.or.at
Sat Jul 13 01:37:04 CEST 2013
Derek Buitenhuis <derek.buitenhuis <at> gmail.com> writes:
>
> On 7/12/2013 3:13 PM, Carl Eugen Hoyos wrote:
> > - av_assert0(ret >= 0);
> > + if (ret < 0)
> > + return ret;
>
> ... No.
>
> This is not what assertions are for, and this
> is a hack.
>
> The root cause should be determined. Furthermore,
> simply returning ret seems pretty damn dangerous
> and filled with consequences for codecs which
> use it.
What did you smoke tonight?
In case your mail wasn't ironic:
While I don't agree that an assert is wrong here
(that is how I interpret your mail), I did find
the root case (note that there was nothing to
find though, looking at the code was sufficient
even for me), I (obviously) looked for all use
cases (checking the consequences) and fixed them.
It is of course (quite) likely that I missed one
or even more of the use cases but I am sure if
you were not trying to troll but actually
interested in helping you would have pointed me
to my mistake(s) instead of writing (very?)
funny emails.
Carl Eugen
More information about the ffmpeg-devel
mailing list