audio-converter: use helper to check intermediate format
authorWim Taymans <wtaymans@redhat.com>
Wed, 24 Feb 2016 11:55:28 +0000 (12:55 +0100)
committerWim Taymans <wtaymans@redhat.com>
Mon, 28 Mar 2016 11:25:54 +0000 (13:25 +0200)
gst-libs/gst/audio/audio-converter.c

index e6d9961..3e91f32 100644 (file)
@@ -959,10 +959,7 @@ gst_audio_converter_new (GstAudioConverterFlags flags, GstAudioInfo * in_info,
           ("same formats, no resampler and passthrough mixing -> passthrough");
       convert->convert = converter_passthrough;
     } else {
-      if (in_info->finfo->format == GST_AUDIO_FORMAT_S16 ||
-          in_info->finfo->format == GST_AUDIO_FORMAT_S32 ||
-          in_info->finfo->format == GST_AUDIO_FORMAT_F32 ||
-          in_info->finfo->format == GST_AUDIO_FORMAT_F64) {
+      if (is_intermediate_format (in_info->finfo->format)) {
         GST_INFO ("same formats, and passthrough mixing -> only resampling");
         convert->convert = converter_resample;
       }