Mercurial > mplayer.hg
changeset 24436:c1b98b43b897
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.
author | reimar |
---|---|
date | Fri, 14 Sep 2007 12:52:13 +0000 |
parents | 79163e100830 |
children | 2f31f31deccc |
files | libmpcodecs/ad_hwac3.c |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/ad_hwac3.c Fri Sep 14 12:47:15 2007 +0000 +++ b/libmpcodecs/ad_hwac3.c Fri Sep 14 12:52:13 2007 +0000 @@ -360,10 +360,9 @@ #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));