changeset 32597:627c9e32c3f2

Move setup of sh_audio->format to a more appropriate place (in asfheader.c).
author reimar
date Sat, 11 Dec 2010 15:43:24 +0000
parents 7f521af5122f
children cbe2409b0c7f
files libmpdemux/asfheader.c libmpdemux/demux_asf.c
diffstat 2 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/asfheader.c	Sat Dec 11 15:30:28 2010 +0000
+++ b/libmpdemux/asfheader.c	Sat Dec 11 15:43:24 2010 +0000
@@ -348,6 +348,7 @@
   sh_audio->wf=calloc((streamh->type_size<sizeof(*sh_audio->wf))?sizeof(*sh_audio->wf):streamh->type_size,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];
--- a/libmpdemux/demux_asf.c	Sat Dec 11 15:30:28 2010 +0000
+++ b/libmpdemux/demux_asf.c	Sat Dec 11 15:43:24 2010 +0000
@@ -657,7 +657,6 @@
             demuxer->audio->sh=NULL;
         } else {
             sh_audio=demuxer->audio->sh;sh_audio->ds=demuxer->audio;
-            sh_audio->format=sh_audio->wf->wFormatTag;
         }
     }
     if(!demuxer->stream->seek)