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

Michael Niedermayer michaelni
Wed Nov 9 12:31:11 CET 2005


Hi

On Tue, Nov 08, 2005 at 11:53:43PM -0400, Johan Lindstr?m wrote:
> >>Hello,
> >>
> >>The H.264 decoder crashes when you return -1 from the custom
> >>get_buffer function. This patch fixes that.
> >
> >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


[...]
-- 
Michael





More information about the ffmpeg-devel mailing list