changeset 36338:d9d308031e9e

Fix channel reordering for ac3_fixed encoder.
author reimar
date Fri, 30 Aug 2013 19:25:11 +0000
parents 805ff0c5b699
children 83d0141a1cdc
files av_helpers.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/av_helpers.c	Sun Aug 25 17:57:25 2013 +0000
+++ b/av_helpers.c	Fri Aug 30 19:25:11 2013 +0000
@@ -120,13 +120,13 @@
     void *orig_src = src;
     int bps = av_get_bytes_per_sample(ctx->sample_fmt);
     int planar = ctx->channels > 1 && av_sample_fmt_is_planar(ctx->sample_fmt);
+    int isac3 = ctx->codec->id == AV_CODEC_ID_AC3;
     int n;
     int got;
     AVPacket pkt;
     AVFrame *frame = avcodec_alloc_frame();
     if ((ctx->channels == 6 || ctx->channels == 5) &&
-        (!strcmp(ctx->codec->name,"ac3") || !strcmp(ctx->codec->name,"libfaac"))) {
-        int isac3 = !strcmp(ctx->codec->name,"ac3");
+        (isac3 || !strcmp(ctx->codec->name,"libfaac"))) {
         reorder_channel_nch(src, AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT,
                             isac3 ? AF_CHANNEL_LAYOUT_LAVC_DEFAULT : AF_CHANNEL_LAYOUT_AAC_DEFAULT,
                             ctx->channels,