mirror of https://github.com/mpv-player/mpv
Fix off-by-one error if fsize is odd (does handling that case even make sense?)
and remove a TODO comment that no longer applies. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24456 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
73acce23fd
commit
502368c206
|
@ -360,10 +360,9 @@ static int decode_audio_dts(unsigned char *indata_ptr, int len, unsigned char *b
|
|||
#ifdef WORDS_BIGENDIAN
|
||||
memcpy(&buf[8], indata_ptr, fsize);
|
||||
#else
|
||||
//TODO if fzise is odd, swab doesn't copy the last byte
|
||||
swab(indata_ptr, &buf[8], fsize);
|
||||
if (fsize & 1)
|
||||
buf[8+fsize] = indata_ptr[fsize];
|
||||
buf[8+fsize-1] = indata_ptr[fsize-1];
|
||||
#endif
|
||||
memset(&buf[fsize + 8], 0, nr_samples * 2 * 2 - (fsize + 8));
|
||||
|
||||
|
|
Loading…
Reference in New Issue