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

Michael Niedermayer michaelni
Wed Nov 9 22:11:07 CET 2005


On Wed, Nov 09, 2005 at 12:10:42PM -0500, The Wanderer wrote:
> 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. 

hmm, i must have forgoten to attach my brain or eyes then ...

> 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?

ehm, no, it looks identical to how i fixed it ...


More information about the ffmpeg-devel mailing list