[FFmpeg-devel] [PATCH]Avoid an assertion failure in ff_init_vlc_sparse

Michael Niedermayer michaelni at gmx.at
Sat Jul 13 03:25:58 CEST 2013

On Fri, Jul 12, 2013 at 07:50:57PM -0400, Derek Buitenhuis wrote:
> On 7/12/2013 7:37 PM, Carl Eugen Hoyos wrote:
> > 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)
> Removing an assert and replacing it with an if statement
> means one of two things:
> 1) The original assert was erroneously used for something
>    that an assert is not supposed to be used for.
> 2) The change is wrong.

To provide some additional details
All things the code allocates currently are temporary arrays that
are freed before the function returns (for the case of the assert
related codepath)
And its likely possible to implement it without these temporary
And without temporary arrays there would be no allocation failure
possible, which would avoid the need for checking and handling
error returns
iam not sure how easy it is to implement this without temporary
arrays though also it needs to be thread safe.

Iam fine with any solution that people like. With a preferrance for

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

You can kill me, but you cannot change the truth.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130713/b7b9c4bf/attachment.asc>

More information about the ffmpeg-devel mailing list