[Ffmpeg-devel] [PATCH] H.264 crash

The Wanderer inverseparadox
Wed Nov 9 18:10:42 CET 2005

Michael Niedermayer wrote:

> Hi
> On Tue, Nov 08, 2005 at 11:53:43PM -0400, Johan Lindstr?m wrote:

>>> Could you provide a sample to reproduce the crash? Just upload
>>> the file somewhere and post a link to it here...
>> Hello,
>> It is not a specific H.264 encoded file that causes the crash, but
>> (I suppose) all H.264 encoded files. The crash occurs when you
>> return -1 from your custom get_buffer function, to indicate that
>> you don't want to return a video frame/buffer to libavcodec. In my
>> code this happens when I want to close/free the movie and do not
>> have any available video frames to return to libavcodec. The
>> get_buffer function blocks on a dequeue call on a queue that holds
>> preallocated video frames that get reused over and over again. They
>> are put back in the queue when the program has
>> processed/displayed/whatevered them, but if all frames are busy
>> there is no frame to return at the time of the freeing the movie,
>> and I can't wait for them to ever become available either, because
>> the display function will need to draw in the main thread, which is
>> blocked on waiting for the movie to be freed, hence I return -1.
>> Does this make sense? I'm not sure if this is the correct thing to
>> do, but it seems to work just fine with all other codecs.
> retry, maybe its fixed, if not RTFS, fix it and send a patch

Er, Michael? The first post in this thread (which came from Johan) *did*
have a patch attached. Whether it fixes the problem or not I don't know,
but he certainly seems to have thought so. Is there something wrong with
that one?

       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.

More information about the ffmpeg-devel mailing list