[MPlayer-cvslog] r20502 - trunk/libmpdemux/demux_ts.c
nicodvb
subversion at mplayerhq.hu
Sun Oct 29 11:33:49 CET 2006
Author: nicodvb
Date: Sun Oct 29 11:33:49 2006
New Revision: 20502
Modified:
trunk/libmpdemux/demux_ts.c
Log:
fixed mishandling of stream_read() (it doesn't necessarily return -1 in case of error)
Modified: trunk/libmpdemux/demux_ts.c
==============================================================================
--- trunk/libmpdemux/demux_ts.c (original)
+++ trunk/libmpdemux/demux_ts.c Sun Oct 29 11:33:49 2006
@@ -2827,10 +2827,10 @@
p = &((*dp)->buffer[*dp_offset]);
}
- buf_size = stream_read(stream, p, buf_size);
- if(buf_size==-1)
+ len = stream_read(stream, p, buf_size);
+ if(len < buf_size)
{
- mp_msg(MSGT_DEMUX, MSGL_DBG2, "\r\nts_parse() couldn't read data\r\n");
+ mp_msg(MSGT_DEMUX, MSGL_DBG2, "\r\nts_parse() couldn't read enough data: %d < %d\r\n", len, buf_size);
continue;
}
stream_skip(stream, junk);
More information about the MPlayer-cvslog
mailing list