summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authorlu_zero <lu_zero@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-11-13 23:01:25 +0000
committerlu_zero <lu_zero@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-11-13 23:01:25 +0000
commit2127b47b470757491d35462c08f9277ed6773662 (patch)
tree2701002bcf5181029bb64bb538973139b3118f29 /libmpdemux
parent4d8aeade41327a3e85a13da3bb39357c8696dc64 (diff)
downloadmpv-2127b47b470757491d35462c08f9277ed6773662.tar.bz2
mpv-2127b47b470757491d35462c08f9277ed6773662.tar.xz
support extradata for audio streams
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25039 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_nemesi.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/libmpdemux/demux_nemesi.c b/libmpdemux/demux_nemesi.c
index 7d90c8e4f6..122e744192 100644
--- a/libmpdemux/demux_nemesi.c
+++ b/libmpdemux/demux_nemesi.c
@@ -156,11 +156,14 @@ demuxer_t* demux_open_rtp(demuxer_t* demuxer)
for (; media; media=media->next) {
sdp_medium_info * info = media->medium_info;
rtp_session * sess = media->rtp_sess;
+ rtp_buff buff;
int media_format = atoi(info->fmts);
rtp_pt * ptinfo = rtp_get_pt_info(sess, media_format);
char const * format_name = ptinfo ? ptinfo->name : NULL;
+ memset(&buff, 0, sizeof(rtp_buff));
+
if (sess->parsers[media_format] == NULL) {
mp_msg(MSGT_DEMUX, MSGL_ERR,
"libNemesi unsupported media format: %s\n",
@@ -176,13 +179,21 @@ demuxer_t* demux_open_rtp(demuxer_t* demuxer)
if (ptinfo->type == AU) {
if (ndsd->session[NEMESI_SESSION_AUDIO] == NULL) {
sh_audio_t* sh_audio = new_sh_audio(demuxer,0);
- WAVEFORMATEX* wf = calloc(1,sizeof(WAVEFORMATEX));
+ WAVEFORMATEX* wf;
demux_stream_t* d_audio = demuxer->audio;
mp_msg(MSGT_DEMUX, MSGL_INFO, "Detected as AUDIO stream...\n");
link_session_and_fetch_conf(ndsd, NEMESI_SESSION_AUDIO,
- sess, NULL, NULL);
+ sess, &buff, NULL);
+
+ if (buff.len) {
+ wf = calloc(1,sizeof(WAVEFORMATEX)+buff.len);
+ wf->cbSize = buff.len;
+ memcpy(wf+1, buff.data, buff.len);
+ } else {
+ wf = calloc(1,sizeof(WAVEFORMATEX));
+ }
sh_audio->wf = wf;
d_audio->sh = sh_audio;
@@ -211,8 +222,6 @@ demuxer_t* demux_open_rtp(demuxer_t* demuxer)
BITMAPINFOHEADER* bih;
demux_stream_t* d_video;
int fps = 0;
- rtp_buff buff;
- memset(&buff, 0, sizeof(rtp_buff));
mp_msg(MSGT_DEMUX, MSGL_INFO, "Detected as VIDEO stream...\n");