lavr: Update the planar check in ff_audio_convert
authorLuca Barbato <lu_zero@gentoo.org>
Sun, 17 Aug 2014 13:28:03 +0000 (13:28 +0000)
committerLuca Barbato <lu_zero@gentoo.org>
Sun, 17 Aug 2014 14:11:02 +0000 (16:11 +0200)
Leftover from fbc0b8659967ea54a8472b5f795270d38bb085dd.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavresample/audio_convert.c

index 11bbbbe..ef23912 100644 (file)
@@ -345,13 +345,13 @@ int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in)
     if (ac->apply_map) {
         ChannelMapInfo *map = &ac->avr->ch_map_info;
 
     if (ac->apply_map) {
         ChannelMapInfo *map = &ac->avr->ch_map_info;
 
-        if (!av_sample_fmt_is_planar(ac->out_fmt)) {
+        if (!ff_sample_fmt_is_planar(ac->out_fmt, ac->channels)) {
             av_log(ac->avr, AV_LOG_ERROR, "cannot remap packed format during conversion\n");
             return AVERROR(EINVAL);
         }
 
         if (map->do_remap) {
             av_log(ac->avr, AV_LOG_ERROR, "cannot remap packed format during conversion\n");
             return AVERROR(EINVAL);
         }
 
         if (map->do_remap) {
-            if (av_sample_fmt_is_planar(ac->in_fmt)) {
+            if (ff_sample_fmt_is_planar(ac->in_fmt, ac->channels)) {
                 conv_func_flat *convert = use_generic ? ac->conv_flat_generic :
                                                         ac->conv_flat;
 
                 conv_func_flat *convert = use_generic ? ac->conv_flat_generic :
                                                         ac->conv_flat;