]> git.sesse.net Git - vlc/blobdiff - src/audio_output/dec.c
Removed audio_date_t in favor to date_t.
[vlc] / src / audio_output / dec.c
index 0c2236bc18b4580257c86353ac9d4147e2493f24..a0bbe372eeab76c607f1afd728b2509bacbd6777 100644 (file)
@@ -61,6 +61,11 @@ static aout_input_t * DecNew( aout_instance_t * p_aout,
         msg_Err( p_aout, "no audio channels" );
         return NULL;
     }
+    if( p_format->i_channels != aout_FormatNbChannels( p_format ) )
+    {
+        msg_Err( p_aout, "incompatible audio channels count with layout mask" );
+        return NULL;
+    }
 
     if( p_format->i_rate > 192000 )
     {
@@ -226,14 +231,8 @@ int aout_DecDelete( aout_instance_t * p_aout, aout_input_t * p_input )
     {
         aout_OutputDelete( p_aout );
         aout_MixerDelete( p_aout );
-        if ( var_Type( p_aout, "audio-device" ) != 0 )
-        {
-            var_Destroy( p_aout, "audio-device" );
-        }
-        if ( var_Type( p_aout, "audio-channels" ) != 0 )
-        {
-            var_Destroy( p_aout, "audio-channels" );
-        }
+        var_Destroy( p_aout, "audio-device" );
+        var_Destroy( p_aout, "audio-channels" );
     }
 
     aout_unlock_mixer( p_aout );