pass along audio extradata if present

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15670 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
nicodvb 2005-06-06 20:49:55 +00:00
parent ed34e0e837
commit 8f224ba1bc
1 changed files with 7 additions and 0 deletions

View File

@ -938,10 +938,17 @@ demuxer_t *demux_open_ts(demuxer_t * demuxer)
if(params.atype != UNKNOWN)
{
ES_stream_t *es = priv->ts.pids[params.apid];
sh_audio = new_sh_audio(demuxer, 0);
sh_audio->ds = demuxer->audio;
sh_audio->format = params.atype;
demuxer->audio->sh = sh_audio;
if(es->extradata && es->extradata_len)
{
sh_audio->wf = (WAVEFORMATEX *) malloc(sizeof (WAVEFORMATEX) + es->extradata_len);
sh_audio->wf->cbSize = es->extradata_len;
memcpy(sh_audio->wf + 1, es->extradata, es->extradata_len);
}
}