[MPlayer-cvslog] r24456 - trunk/libmpcodecs/ad_hwac3.c

reimar subversion at mplayerhq.hu
Fri Sep 14 14:52:13 CEST 2007


Author: reimar
Date: Fri Sep 14 14:52:13 2007
New Revision: 24456

Log:
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.


Modified:
   trunk/libmpcodecs/ad_hwac3.c

Modified: trunk/libmpcodecs/ad_hwac3.c
==============================================================================
--- trunk/libmpcodecs/ad_hwac3.c	(original)
+++ trunk/libmpcodecs/ad_hwac3.c	Fri Sep 14 14:52:13 2007
@@ -360,10 +360,9 @@ static int decode_audio_dts(unsigned cha
 #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));
 



More information about the MPlayer-cvslog mailing list