+ p_stream->i_cat = AUDIO_ES;
+ p_stream->fcc[0] = '0' + p_sys->i_streams / 10;
+ p_stream->fcc[1] = '0' + p_sys->i_streams % 10;
+ p_stream->fcc[2] = 'w';
+ p_stream->fcc[3] = 'b';
+
+ p_stream->p_bih = NULL;
+
+ p_stream->p_wf = malloc( sizeof( WAVEFORMATEX ) +
+ p_input->p_fmt->i_extra );
+ if( !p_stream->p_wf )
+ {
+ free( p_input->p_sys );
+ return VLC_ENOMEM;
+ }
+#define p_wf p_stream->p_wf
+ p_wf->cbSize = p_input->p_fmt->i_extra;
+ if( p_wf->cbSize > 0 )
+ {
+ memcpy( &p_wf[1],
+ p_input->p_fmt->p_extra,
+ p_input->p_fmt->i_extra );
+ }
+ p_wf->nChannels = p_input->p_fmt->audio.i_channels;
+ p_wf->nSamplesPerSec = p_input->p_fmt->audio.i_rate;
+ p_wf->nBlockAlign = p_input->p_fmt->audio.i_blockalign;
+ p_wf->nAvgBytesPerSec= p_input->p_fmt->i_bitrate / 8;
+ p_wf->wBitsPerSample = 0;
+
+ switch( p_input->p_fmt->i_codec )