pass wave extradata to the codec..

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14634 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
alex 2005-02-01 19:19:40 +00:00
parent e5e0a2adcc
commit 43734534a4
1 changed files with 9 additions and 0 deletions

View File

@ -78,6 +78,15 @@ static int init(sh_audio_t *sh_audio)
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);