[MPlayer-dev-eng] [Patch]ad-hwac3.c minor fix

Wei Jiang jiangw98 at yahoo.com
Mon Nov 1 01:10:16 CET 2004


When the crc for ac3 block failed, there is a very high chance it is wrong detected( ac3 has
shorter sync word length ), program should return error to give DTS decoder a decent chance to try
to decode correctly.

In one of my XBMC test Swedish Radio test sample, that is the case.

This patch will sort out the wrong detection of AC3, and relay the task to libDTS decoder(Not
passthrough code). If the passthrouh is still wanted, then this routine need to rewrite the
detection part to allow both AC3 and DTS has been tested before send back fail signal.

diff -u -r1.10 ad_hwac3.c
--- libmpcodecs/ad_hwac3.c	26 Sep 2003 19:21:08 -0000	1.10
+++ libmpcodecs/ad_hwac3.c	1 Nov 2004 00:01:07 -0000
@@ -92,7 +92,10 @@
     
   // TODO: is DTS also checksummed?
   if(isdts == 0 && crc16_block(sh_audio->a_in_buffer + 2, length - 2) != 0)
+  {
     mp_msg(MSGT_DECAUDIO, MSGL_STATUS, "a52: CRC check failed!  \n");
+    return -1;
+  }
     
   return length;
 }





__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the MPlayer-dev-eng mailing list