mirror of https://github.com/mpv-player/mpv
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:
parent
e5e0a2adcc
commit
43734534a4
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue