comparison libmpdemux/demux_ts.c @ 15669:d283a96c0ecb

pass along audio extradata if present
author nicodvb
date Mon, 06 Jun 2005 20:49:55 +0000
parents 737cc83784fb
children 6b86089c2edd
comparison
equal deleted inserted replaced
15668:8fc10647e146 15669:d283a96c0ecb
936 demuxer->video->sh = sh_video; 936 demuxer->video->sh = sh_video;
937 } 937 }
938 938
939 if(params.atype != UNKNOWN) 939 if(params.atype != UNKNOWN)
940 { 940 {
941 ES_stream_t *es = priv->ts.pids[params.apid];
941 sh_audio = new_sh_audio(demuxer, 0); 942 sh_audio = new_sh_audio(demuxer, 0);
942 sh_audio->ds = demuxer->audio; 943 sh_audio->ds = demuxer->audio;
943 sh_audio->format = params.atype; 944 sh_audio->format = params.atype;
944 demuxer->audio->sh = sh_audio; 945 demuxer->audio->sh = sh_audio;
946 if(es->extradata && es->extradata_len)
947 {
948 sh_audio->wf = (WAVEFORMATEX *) malloc(sizeof (WAVEFORMATEX) + es->extradata_len);
949 sh_audio->wf->cbSize = es->extradata_len;
950 memcpy(sh_audio->wf + 1, es->extradata, es->extradata_len);
951 }
945 } 952 }
946 953
947 954
948 mp_msg(MSGT_DEMUXER,MSGL_INFO, "Opened TS demuxer, audio: %x(pid %d), video: %x(pid %d)...POS=%llu\n", params.atype, demuxer->audio->id, params.vtype, demuxer->video->id, (uint64_t) start_pos); 955 mp_msg(MSGT_DEMUXER,MSGL_INFO, "Opened TS demuxer, audio: %x(pid %d), video: %x(pid %d)...POS=%llu\n", params.atype, demuxer->audio->id, params.vtype, demuxer->video->id, (uint64_t) start_pos);
949 956