summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJames Courtier-Dutton <jcdutton@users.sourceforge.net>2004-05-16 21:45:24 +0000
committerJames Courtier-Dutton <jcdutton@users.sourceforge.net>2004-05-16 21:45:24 +0000
commitedff8fd5744069608128007d840ae9b23dc32966 (patch)
tree294de590b51dc34e0dbeb6ad77c48b7de0a77281 /src
parent885e3817c8b2c0487f4de4f81fb902fdeee64587 (diff)
downloadxine-lib-edff8fd5744069608128007d840ae9b23dc32966.tar.gz
xine-lib-edff8fd5744069608128007d840ae9b23dc32966.tar.bz2
From: Reinhard Nissl.
The fix stopps dropping properly received data. I realized the problem when switching channels in VDR. From time to time, it happend that switching took more than 50 ms (the timeout value used in _x_read_abort()), which caused the select() to timeout. In the case where 'stream->demux_action_pending' was set, the already received data was dropped due to returning 0. This finally resulted in your demuxer to fail with DEMUX_END, as it couldn't read 6 bytes from the PES header. So for the case, that there is some data available, it now takes twice the timeout (i. e. 100 ms), before a return 0 happens. Some more information: as in rare cases switching channels could take even longer than 100 ms, I've also added a loop around _x_read_about() in my VDR input plugin, which returns 0 just after this state lasts for 5 seconds. CVS patchset: 6557 CVS date: 2004/05/16 21:45:24
Diffstat (limited to 'src')
-rw-r--r--src/xine-engine/demux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xine-engine/demux.c b/src/xine-engine/demux.c
index 0708d3e51..6399c0776 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.48 2004/04/07 18:10:20 valtri Exp $
+ * $Id: demux.c,v 1.49 2004/05/16 21:45:24 jcdutton Exp $
*/
@@ -431,7 +431,7 @@ off_t _x_read_abort (xine_stream_t *stream, int fd, char *buf, off_t todo) {
* cannot be stopped when no more data is available.
*/
if( stream->demux_action_pending )
- return 0;
+ return total;
} else {
break;
}