[FFmpeg-devel] [PATCH] fix crash in ffplay.c #1
Tue Dec 30 01:52:06 CET 2008
On Mon, Dec 29, 2008 at 06:25:01PM -0500, Ronald S. Bultje wrote:
> when pressing 'q' to exit ffplay, I occasionally get crashes. I've
and gdb output ?
> tracked it down to a race condition (I think). After 'q', the audio
> objects are discarded and ffplay.c sets
what audio object?
> 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.
is->audio_buf should still be existing, its just pointing to part of is
stream is an argument from the callback and id consider it very strange
if a argument given to a function becomes invalid at random.
> I think it should just quit, see
> attached patch. With the attached patch, I no longer get such
> segfaults on exit.
so and how is this going to work if we happen to be just after the if()
or even in the memcpy/memset accessing the buffer ...
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel