changeset 14633:bde5c3261037

pass wave extradata to the codec..
author alex
date Tue, 01 Feb 2005 19:19:40 +0000
parents f07f529210c3
children d92dab9e76b6
files libmpcodecs/ad_ffmpeg.c
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ad_ffmpeg.c	Tue Feb 01 13:07:00 2005 +0000
+++ b/libmpcodecs/ad_ffmpeg.c	Tue Feb 01 19:19:40 2005 +0000
@@ -78,6 +78,15 @@
                lavc_context->extradata_size);
     }
 
+    // for QDM2
+    if (sh_audio->codecdata_len && sh_audio->codecdata && !lavc_context->extradata)
+    {
+        lavc_context->extradata = av_malloc(sh_audio->codecdata_len);
+        lavc_context->extradata_size = sh_audio->codecdata_len;
+        memcpy(lavc_context->extradata, (char *)sh_audio->codecdata, 
+               lavc_context->extradata_size);	
+    }
+
     /* open it */
     if (avcodec_open(lavc_context, lavc_codec) < 0) {
         mp_msg(MSGT_DECAUDIO,MSGL_ERR, MSGTR_CantOpenCodec);