diff options
Diffstat (limited to 'src/xine-engine/demux.c')
-rw-r--r-- | src/xine-engine/demux.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/xine-engine/demux.c b/src/xine-engine/demux.c index 3232c497f..c6a234ae5 100644 --- a/src/xine-engine/demux.c +++ b/src/xine-engine/demux.c @@ -20,7 +20,7 @@ * Demuxer helper functions * hide some xine engine details from demuxers and reduce code duplication * - * $Id: demux.c,v 1.63 2006/08/08 03:25:03 miguelfreitas Exp $ + * $Id: demux.c,v 1.64 2006/08/13 23:51:34 miguelfreitas Exp $ */ @@ -313,6 +313,17 @@ static void *demux_loop (void *stream_gen) { status = stream->demux_plugin->get_status(stream->demux_plugin); } + /* delay sending finished event - used for image presentations */ + while(stream->demux_thread_running && + status == DEMUX_FINISHED && stream->delay_finish_event != 0){ + pthread_mutex_unlock( &stream->demux_lock ); + xine_usec_sleep(100000); + if( stream->delay_finish_event > 0 ) + stream->delay_finish_event--; + pthread_mutex_lock( &stream->demux_lock ); + status = stream->demux_plugin->get_status(stream->demux_plugin); + } + } while( status == DEMUX_OK && stream->demux_thread_running && !stream->emergency_brake); |