changeset 15669:d283a96c0ecb

pass along audio extradata if present
author nicodvb
date Mon, 06 Jun 2005 20:49:55 +0000
parents 8fc10647e146
children 081bee8052cf
files libmpdemux/demux_ts.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_ts.c	Mon Jun 06 19:36:41 2005 +0000
+++ b/libmpdemux/demux_ts.c	Mon Jun 06 20:49:55 2005 +0000
@@ -938,10 +938,17 @@
 
 	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);
+                }
 	}