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 /include | |
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 'include')
-rw-r--r-- | include/xine/xine_internal.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/xine/xine_internal.h b/include/xine/xine_internal.h index b12d20880..ac8e6cabf 100644 --- a/include/xine/xine_internal.h +++ b/include/xine/xine_internal.h @@ -334,6 +334,7 @@ struct xine_stream_s { /* demux thread stuff */ pthread_t demux_thread; pthread_mutex_t demux_lock; + pthread_mutex_t demux_action_lock; pthread_cond_t demux_resume; pthread_mutex_t demux_mutex; /* used in _x_demux_... functions to synchronize order of pairwise A/V buffer operations */ @@ -421,6 +422,9 @@ off_t _x_read_abort (xine_stream_t *stream, int fd, char *buf, off_t todo) XINE_ int _x_action_pending (xine_stream_t *stream) XINE_PROTECTED; +void _x_action_raise (xine_stream_t *stream) XINE_PROTECTED; +void _x_action_lower (xine_stream_t *stream) XINE_PROTECTED; + void _x_demux_send_data(fifo_buffer_t *fifo, uint8_t *data, int size, int64_t pts, uint32_t type, uint32_t decoder_flags, int input_normpos, int input_time, int total_time, |