summaryrefslogtreecommitdiffstats
path: root/libmpdemux/asfheader.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmpdemux/asfheader.c')
-rw-r--r--libmpdemux/asfheader.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmpdemux/asfheader.c b/libmpdemux/asfheader.c
index 1db6eef1ac..7a2285e2a1 100644
--- a/libmpdemux/asfheader.c
+++ b/libmpdemux/asfheader.c
@@ -344,9 +344,10 @@ static int asf_init_audio_stream(demuxer_t *demuxer,struct asf_priv* asf, sh_aud
uint8_t *buffer = *buf;
int pos = *ppos;
- sh_audio->wf=calloc((streamh->type_size<sizeof(*sh_audio->wf))?sizeof(*sh_audio->wf):streamh->type_size,1);
+ sh_audio->wf=calloc(FFMAX(streamh->type_size, sizeof(*sh_audio->wf)), 1);
memcpy(sh_audio->wf,buffer,streamh->type_size);
le2me_WAVEFORMATEX(sh_audio->wf);
+ sh_audio->format=sh_audio->wf->wFormatTag;
if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_wave_header(sh_audio->wf,MSGL_V);
if(ASF_LOAD_GUID_PREFIX(streamh->concealment)==ASF_GUID_PREFIX_audio_conceal_interleave){
buffer = &hdr[pos];