[vlc-commits] a52dec: do not change output format (refs #5150)

Rémi Denis-Courmont git at videolan.org
Wed Aug 3 17:06:46 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Aug  3 16:45:01 2011 +0300| [c97c04369c758277a0108ad7e0784d912ed81b35] | committer: Rémi Denis-Courmont

a52dec: do not change output format (refs #5150)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c97c04369c758277a0108ad7e0784d912ed81b35
---

 modules/audio_filter/converter/a52tofloat32.c |   15 ++++-----------
 1 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/modules/audio_filter/converter/a52tofloat32.c b/modules/audio_filter/converter/a52tofloat32.c
index be73531..2980dd8 100644
--- a/modules/audio_filter/converter/a52tofloat32.c
+++ b/modules/audio_filter/converter/a52tofloat32.c
@@ -354,21 +354,14 @@ static int OpenFilter( vlc_object_t *p_this )
     filter_sys_t *p_sys;
     int i_ret;
 
-    if( p_filter->fmt_in.i_codec != VLC_CODEC_A52 ||
-        p_filter->fmt_out.audio.i_format == VLC_CODEC_SPDIFB ||
-        p_filter->fmt_out.audio.i_format == VLC_CODEC_SPDIFL )
-    {
+    if( p_filter->fmt_in.i_codec != VLC_CODEC_A52 )
         return VLC_EGENERIC;
-    }
-
-    p_filter->fmt_out.audio.i_format =
 #ifdef LIBA52_FIXED
-        p_filter->fmt_out.i_codec = VLC_CODEC_FI32;
+    if( p_filter->fmt_out.audio.i_format != VLC_CODEC_FI32 )
 #else
-        p_filter->fmt_out.i_codec = VLC_CODEC_FL32;
+    if( p_filter->fmt_out.audio.i_format != VLC_CODEC_FL32 )
 #endif
-    p_filter->fmt_out.audio.i_bitspersample =
-        aout_BitsPerSample( p_filter->fmt_out.i_codec );
+        return VLC_EGENERIC;
 
     /* Allocate the memory needed to store the module's structure */
     p_filter->p_sys = p_sys = malloc( sizeof(filter_sys_t) );



More information about the vlc-commits mailing list