[vlc-commits] mad: convert as requested by caller (refs #5150)
Rémi Denis-Courmont
git at videolan.org
Wed Aug 3 17:06:47 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Aug 3 16:53:03 2011 +0300| [5593848a8e14cf6bcf14293ce6c52b7e4845061b] | committer: Rémi Denis-Courmont
mad: convert as requested by caller (refs #5150)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5593848a8e14cf6bcf14293ce6c52b7e4845061b
---
modules/audio_filter/converter/mpgatofixed32.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/modules/audio_filter/converter/mpgatofixed32.c b/modules/audio_filter/converter/mpgatofixed32.c
index 9d75236..440472b 100644
--- a/modules/audio_filter/converter/mpgatofixed32.c
+++ b/modules/audio_filter/converter/mpgatofixed32.c
@@ -39,7 +39,6 @@
#include <vlc_aout.h>
#include <vlc_block.h>
#include <vlc_filter.h>
-#include <vlc_cpu.h>
/*****************************************************************************
* Local prototypes
@@ -177,9 +176,14 @@ static int OpenFilter( vlc_object_t *p_this )
filter_t *p_filter = (filter_t *)p_this;
filter_sys_t *p_sys;
- if( p_filter->fmt_in.i_codec != VLC_CODEC_MPGA &&
- p_filter->fmt_in.i_codec != VLC_FOURCC('m','p','g','3') )
+ if( p_filter->fmt_in.audio.i_format != VLC_CODEC_MPGA &&
+ p_filter->fmt_in.audio.i_format != VLC_FOURCC('m','p','g','3') )
return VLC_EGENERIC;
+
+ if( p_filter->fmt_out.audio.i_format != VLC_CODEC_FL32
+ && p_filter->fmt_out.audio.i_format != VLC_CODEC_FI32 )
+ return VLC_EGENERIC;
+
if( !AOUT_FMTS_SIMILAR( &p_filter->fmt_in.audio, &p_filter->fmt_out.audio ) )
return VLC_EGENERIC;
@@ -197,11 +201,6 @@ static int OpenFilter( vlc_object_t *p_this )
mad_synth_init( &p_sys->mad_synth );
mad_stream_options( &p_sys->mad_stream, MAD_OPTION_IGNORECRC );
- p_filter->fmt_out.i_codec = HAVE_FPU ? VLC_CODEC_FL32 : VLC_CODEC_FI32;
- p_filter->fmt_out.audio.i_format = p_filter->fmt_out.i_codec;
- p_filter->fmt_out.audio.i_bitspersample =
- aout_BitsPerSample( p_filter->fmt_out.i_codec );
-
msg_Dbg( p_this, "%4.4s->%4.4s, bits per sample: %i",
(char *)&p_filter->fmt_in.i_codec,
(char *)&p_filter->fmt_out.i_codec,
More information about the vlc-commits
mailing list