changeset 12473:6f11d107f7b8

If demuxer does not fill codecdata try to get if from waveformatex (fixes audio format 0xff)
author rtognimp
date Fri, 14 May 2004 18:47:17 +0000
parents 87348db65305
children 66c8f7ed3f55
files libmpcodecs/ad_faad.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ad_faad.c	Fri May 14 17:44:56 2004 +0000
+++ b/libmpcodecs/ad_faad.c	Fri May 14 18:47:17 2004 +0000
@@ -55,6 +55,11 @@
   faac_hdec = faacDecOpen();
 
   // If we don't get the ES descriptor, try manual config
+  if(!sh->codecdata_len && sh->wf) {
+    sh->codecdata_len = sh->wf->cbSize;
+    sh->codecdata = (char*)(sh->wf+1);
+    mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"FAAD: codecdata extracted from WAVEFORMATEX\n");
+  }
   if(!sh->codecdata_len) {
 #if 1
     faacDecConfigurationPtr faac_conf;