[FFmpeg-devel] [PATCH] fix crash in ffplay.c #1

Ronald S. Bultje rsbultje
Tue Dec 30 00:25:01 CET 2008


Hi,

when pressing 'q' to exit ffplay, I occasionally get crashes. I've
tracked it down to a race condition (I think). After 'q', the audio
objects are discarded and ffplay.c sets
VideoState->audioq->abort_request. When set, audio_decode_frame(),
which is called from within the sdl_audio_callback() callback, returns
-1. However, sdl_audio_callback() then writes silence in the
(no-longer-existing) audio buffer. I think it should just quit, see
attached patch. With the attached patch, I no longer get such
segfaults on exit.

Ronald
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: x2
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081229/eb882851/attachment.asc>



More information about the ffmpeg-devel mailing list