]> granicus.if.org Git - handbrake/commitdiff
encavcodecaudio: fix AAC 5.1 encoding
authorJohn Stebbins <jstebbins.hb@gmail.com>
Thu, 27 Dec 2018 19:04:00 +0000 (12:04 -0700)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Thu, 27 Dec 2018 19:06:10 +0000 (12:06 -0700)
Use 5.1 back for AAC because 5.1 side uses a not-so-universally
supported feature to signal the non-standard layout

Fixes https://github.com/HandBrake/HandBrake/issues/1744

(cherry picked from commit bd4dc1dde6948389b0b7d98e501791a5ec6ec8c7)

libhb/encavcodecaudio.c

index a2152d0ffa883ddf337dad19a6bcf0f387ab0ea7..7c7cbd36160b4956f264617b402ddc2048514151 100644 (file)
@@ -105,6 +105,11 @@ static int encavcodecaInit(hb_work_object_t *w, hb_job_t *job)
 
         case HB_ACODEC_FFAAC:
             codec_name = "aac";
+            // Use 5.1 back for AAC because 5.1 side uses a
+            // not-so-universally supported feature to signal the
+            // non-standard layout
+            if (channel_layout == AV_CH_LAYOUT_5POINT1)
+                channel_layout  = AV_CH_LAYOUT_5POINT1_BACK;
             break;
 
         case HB_ACODEC_FFFLAC: