mirror of
https://github.com/mpv-player/mpv
synced 2025-01-03 21:42:18 +00:00
"i < sizeof(buf)" must be "i < sizeof(buf) - 5", since later buf[i + 5] is used.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17776 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
6c232b95c4
commit
425573eb0d
@ -312,7 +312,7 @@ static int demux_audio_open(demuxer_t* demuxer) {
|
||||
unsigned char buf[16384]; // vlc uses 16384*4 (4 dts frames)
|
||||
unsigned int i;
|
||||
stream_read(s, buf, sizeof(buf));
|
||||
for (i = 0; i < sizeof(buf); i += 2) {
|
||||
for (i = 0; i < sizeof(buf) - 5; i += 2) {
|
||||
// DTS, 14 bit, LE
|
||||
if((buf[i] == 0xff) && (buf[i+1] == 0x1f) && (buf[i+2] == 0x00) &&
|
||||
(buf[i+3] == 0xe8) && ((buf[i+4] & 0xfe) == 0xf0) && (buf[i+5] == 0x07)) {
|
||||
|
Loading…
Reference in New Issue
Block a user