lswr: fix assert failure on unknown layouts.
authorNicolas George <george@nsup.org>
Fri, 25 Oct 2013 14:11:30 +0000 (16:11 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Thu, 28 Nov 2013 00:09:06 +0000 (01:09 +0100)
(cherry picked from commit 4a640a6ac89099bfb02d6d3d3ada04e321a37476)

libswresample/rematrix.c

index 2ebe397..44ad792 100644 (file)
@@ -424,8 +424,8 @@ int swri_rematrix(SwrContext *s, AudioData *out, AudioData *in, int len, int mus
         off = len1 * out->bps;
     }
 
-    av_assert0(out->ch_count == av_get_channel_layout_nb_channels(s->out_ch_layout));
-    av_assert0(in ->ch_count == av_get_channel_layout_nb_channels(s-> in_ch_layout));
+    av_assert0(!s->out_ch_layout || out->ch_count == av_get_channel_layout_nb_channels(s->out_ch_layout));
+    av_assert0(!s-> in_ch_layout || in ->ch_count == av_get_channel_layout_nb_channels(s-> in_ch_layout));
 
     for(out_i=0; out_i<out->ch_count; out_i++){
         switch(s->matrix_ch[out_i][0]){