diff options
| author | Ian Rae <irae@real.com> | 2009-09-14 10:01:43 -0700 |
|---|---|---|
| committer | Ian Rae <irae@real.com> | 2009-09-14 10:01:43 -0700 |
| commit | 2241baa294539a33d8bc6137e633bb4c93c22b4e (patch) | |
| tree | 34ca8949c179ee9babd14d14976fb2fe0ceb6679 /src/xine-engine/video_decoder.c | |
| parent | 9fe31f395320f8b41b7cad84d7f308a3091251a3 (diff) | |
| download | xine-lib-2241baa294539a33d8bc6137e633bb4c93c22b4e.tar.gz xine-lib-2241baa294539a33d8bc6137e633bb4c93c22b4e.tar.bz2 | |
Protected access to stream->demux_action_pending
The deadlock was caused by the unprotected use of
stream->demux_action_pending internal variable from play_internal() and from
within the demuxer loop.
Direct access to demux_action_pending is replaced with _x_action_raise() and
_x_action_lower(), which use a mutex for thread safety.
Diffstat (limited to 'src/xine-engine/video_decoder.c')
| -rw-r--r-- | src/xine-engine/video_decoder.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c index ed2e41ef3..c548d12ef 100644 --- a/src/xine-engine/video_decoder.c +++ b/src/xine-engine/video_decoder.c @@ -92,7 +92,7 @@ int _x_spu_decoder_sleep(xine_stream_t *stream, int64_t next_spu_vpts) thread_vacant = (stream->video_fifo->first->type != BUF_CONTROL_FLUSH_DECODER); /* we have to return if the demuxer needs us to release a buffer */ if (thread_vacant) - thread_vacant = !stream->demux_action_pending; + thread_vacant = !_x_action_pending(stream); } while (wait == SPU_SLEEP_INTERVAL && thread_vacant); |
