mirror of
https://github.com/mpv-player/mpv
synced 2025-04-01 00:07:33 +00:00
Make sure we do not use uninitialized data in case of a short read.
Not really relevant but fixes bug #1109 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27143 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
d5e01cffea
commit
2293c79521
@ -423,6 +423,7 @@ static int demux_audio_open(demuxer_t* demuxer) {
|
||||
if((w->wFormatTag == 0x01) && (w->nChannels == 2) && (w->nSamplesPerSec == 44100)) {
|
||||
unsigned char buf[16384]; // vlc uses 16384*4 (4 dts frames)
|
||||
unsigned int i;
|
||||
memset(buf, 0, sizeof(buf));
|
||||
stream_read(s, buf, sizeof(buf));
|
||||
for (i = 0; i < sizeof(buf) - 5; i += 2) {
|
||||
// DTS, 14 bit, LE
|
||||
|
Loading…
Reference in New Issue
Block a user