[FFmpeg-devel] [PATCH 1/3] Revert "bitstream: make vlc init of static tables thread safe."

Michael Niedermayer michaelni at gmx.at
Sat Jul 13 20:17:43 CEST 2013

On Sat, Jul 13, 2013 at 05:54:44PM +0000, Paul B Mahol wrote:
> On 7/13/13, Michael Niedermayer <michaelni at gmx.at> wrote:
> > This reverts commit 4b6869d6e0120c92253d525921f0e04361888e10.
> >
> > Conflicts:
> >
> > 	libavcodec/bitstream.c
> >
> > This code can cause assertion failures on artificial OOM situations
> And why revert it? It can not be fixed or?

There are basically 4 options
1. leave this code and replace the mallocs by a second on stack buffer
2. drop this code and use some kind of synchronization
3. rewrite the code to be fundamentally thread safe
4. deal with malloc failures in all callers

I did 2.
carl did 4.

3. is probably not that easy and may have performace implications


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- 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/46d157a6/attachment.asc>

More information about the ffmpeg-devel mailing list