summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2006-12-03 19:23:16 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2006-12-03 19:23:16 +0000
commit6876730b6da8f78a34c18306a0234c77b681641b (patch)
tree2402c814a6cdbc962e9598bc73769f30e0ddca88 /src
parent81fbe8ca719feb4e02b826bee0a779401a785e3f (diff)
downloadxine-lib-6876730b6da8f78a34c18306a0234c77b681641b.tar.gz
xine-lib-6876730b6da8f78a34c18306a0234c77b681641b.tar.bz2
should fix bug reported by Christophe Thommeret where avi+subtitlesxine-1_1_3-release1.1.3
(actually master/slave streams) could cause demux to get into an endless loop. CVS patchset: 8401 CVS date: 2006/12/03 19:23:16
Diffstat (limited to 'src')
-rw-r--r--src/xine-engine/demux.c4
-rw-r--r--src/xine-engine/video_decoder.c14
2 files changed, 12 insertions, 6 deletions
diff --git a/src/xine-engine/demux.c b/src/xine-engine/demux.c
index c6a234ae5..2178ccb71 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.64 2006/08/13 23:51:34 miguelfreitas Exp $
+ * $Id: demux.c,v 1.65 2006/12/03 19:23:16 miguelfreitas Exp $
*/
@@ -336,7 +336,7 @@ static void *demux_loop (void *stream_gen) {
finished_count_video = stream->finished_count_video + 1;
pthread_mutex_unlock (&stream->counter_lock);
- /* demux_thread_running is zero if demux loop has being stopped by user */
+ /* demux_thread_running is zero if demux loop has been stopped by user */
non_user = stream->demux_thread_running;
stream->demux_thread_running = 0;
diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c
index 16ebb61b2..8f6b82faa 100644
--- a/src/xine-engine/video_decoder.c
+++ b/src/xine-engine/video_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_decoder.c,v 1.161 2006/09/08 21:11:29 miguelfreitas Exp $
+ * $Id: video_decoder.c,v 1.162 2006/12/03 19:23:16 miguelfreitas Exp $
*
*/
@@ -193,8 +193,13 @@ static void *video_decoder_loop (void *stream_gen) {
/*
* wait the output fifos to run dry before sending the notification event
- * to the frontend. this test is only valid if there is only a single
- * stream attached to the current output port.
+ * to the frontend. exceptions:
+ * 1) don't wait if there is more than one stream attached to the current
+ * output port (the other stream might be sending data so we would be
+ * here forever)
+ * 2) early_finish_event: send notification asap to allow gapless switch
+ * 3) slave stream: don't wait. get into an unblocked state asap to allow
+ * new master actions.
*/
while(1) {
int num_bufs, num_streams;
@@ -204,7 +209,8 @@ static void *video_decoder_loop (void *stream_gen) {
num_streams = stream->video_out->get_property(stream->video_out, VO_PROP_NUM_STREAMS);
running_ticket->release(running_ticket, 0);
- if( num_bufs > 0 && num_streams == 1 && !stream->early_finish_event )
+ if( num_bufs > 0 && num_streams == 1 && !stream->early_finish_event &&
+ stream->master == stream )
xine_usec_sleep (10000);
else
break;