summaryrefslogtreecommitdiff
path: root/src/xine-engine/demux.c
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2009-02-09 22:09:28 -0200
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2009-02-09 22:09:28 -0200
commit8f9a6421c30167b2bf314d512ae70b27d0167bb1 (patch)
treeed5f8b2c71ef01d4df40c8fb2f5b6b9deda2b612 /src/xine-engine/demux.c
parentb69cc6330e66260238abf75164f18db17337ba20 (diff)
downloadxine-lib-8f9a6421c30167b2bf314d512ae70b27d0167bb1.tar.gz
xine-lib-8f9a6421c30167b2bf314d512ae70b27d0167bb1.tar.bz2
Fix race conditions in gapless_switch (ref. kde bug #180339)
Diffstat (limited to 'src/xine-engine/demux.c')
-rw-r--r--src/xine-engine/demux.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/xine-engine/demux.c b/src/xine-engine/demux.c
index cfb13831e..5e9cf5a83 100644
--- a/src/xine-engine/demux.c
+++ b/src/xine-engine/demux.c
@@ -231,15 +231,18 @@ void _x_demux_control_headers_done (xine_stream_t *stream) {
void _x_demux_control_start( xine_stream_t *stream ) {
buf_element_t *buf;
+ uint32_t flags = (stream->gapless_switch) ? BUF_FLAG_GAPLESS_SW : 0;
pthread_mutex_lock(&stream->demux_mutex);
buf = stream->video_fifo->buffer_pool_alloc (stream->video_fifo);
buf->type = BUF_CONTROL_START;
+ buf->decoder_flags = flags;
stream->video_fifo->put (stream->video_fifo, buf);
buf = stream->audio_fifo->buffer_pool_alloc (stream->audio_fifo);
buf->type = BUF_CONTROL_START;
+ buf->decoder_flags = flags;
stream->audio_fifo->put (stream->audio_fifo, buf);
pthread_mutex_unlock(&stream->demux_mutex);