src_movie: set the channel layout to default if the codec did not set it.
authorNicolas George <nicolas.george@normalesup.org>
Sat, 5 Nov 2011 20:21:47 +0000 (21:21 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 6 Nov 2011 00:19:56 +0000 (01:19 +0100)
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/src_movie.c

index feb0285..206099c 100644 (file)
@@ -353,7 +353,8 @@ static int amovie_query_formats(AVFilterContext *ctx)
 
     enum AVSampleFormat sample_fmts[] = { c->sample_fmt, -1 };
     int packing_fmts[] = { AVFILTER_PACKED, -1 };
-    int64_t chlayouts[] = { c->channel_layout, -1 };
+    int64_t chlayouts[] = { c->channel_layout ? c->channel_layout :
+                            av_get_default_channel_layout(c->channels), -1 };
 
     avfilter_set_common_sample_formats (ctx, avfilter_make_format_list(sample_fmts));
     avfilter_set_common_packing_formats(ctx, avfilter_make_format_list(packing_fmts));