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

ulion subversion at mplayerhq.hu
Thu May 8 17:55:21 CEST 2008


Author: ulion
Date: Thu May  8 17:55:21 2008
New Revision: 26693

Log:
judge between ac3 and dts by format tag.


Modified:
   trunk/libmpcodecs/ad_hwac3.c

Modified: trunk/libmpcodecs/ad_hwac3.c
==============================================================================
--- trunk/libmpcodecs/ad_hwac3.c	(original)
+++ trunk/libmpcodecs/ad_hwac3.c	Thu May  8 17:55:21 2008
@@ -61,6 +61,8 @@ static int ac3dts_fillbuff(sh_audio_t *s
       sh_audio->a_in_buffer[sh_audio->a_in_buffer_len++] = c;
     }
 
+    if (sh_audio->format == 0x2001)
+    {
     length = dts_syncinfo(sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate);
     if(length >= 12)
     {
@@ -71,6 +73,9 @@ static int ac3dts_fillbuff(sh_audio_t *s
       }
       break;
     }
+    }
+    else
+    {
     length = a52_syncinfo(sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate);
     if(length >= 7 && length <= 3840) 
     {
@@ -81,6 +86,7 @@ static int ac3dts_fillbuff(sh_audio_t *s
       }
       break; /* we're done.*/
     }
+    }
     /* bad file => resync*/
     memcpy(sh_audio->a_in_buffer, sh_audio->a_in_buffer + 1, 11);
     --sh_audio->a_in_buffer_len;



More information about the MPlayer-cvslog mailing list