mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 04:44:32 +01:00
fixed mishandling of stream_read() (it doesn't necessarily return -1 in case of error)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20502 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
e534b4afa9
commit
4ea549d06f
@ -2827,10 +2827,10 @@ static int ts_parse(demuxer_t *demuxer , ES_stream_t *es, unsigned char *packet,
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user