mirror of https://github.com/mpv-player/mpv
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]);
|
p = &((*dp)->buffer[*dp_offset]);
|
||||||
}
|
}
|
||||||
|
|
||||||
buf_size = stream_read(stream, p, buf_size);
|
len = stream_read(stream, p, buf_size);
|
||||||
if(buf_size==-1)
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
stream_skip(stream, junk);
|
stream_skip(stream, junk);
|
||||||
|
|
Loading…
Reference in New Issue