]> granicus.if.org Git - handbrake/commitdiff
opus: fix 5.1 encoding
authorJohn Stebbins <jstebbins.hb@gmail.com>
Sun, 11 Sep 2016 18:32:29 +0000 (11:32 -0700)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Sun, 11 Sep 2016 18:32:29 +0000 (11:32 -0700)
libhb/encavcodecaudio.c

index 73d44a25ccd461d5b359256c8558e930790dc664..b66a86ffad90ac28e7f3363fcd985191d06d785c 100644 (file)
@@ -127,6 +127,10 @@ static int encavcodecaInit(hb_work_object_t *w, hb_job_t *job)
 
         case HB_ACODEC_OPUS:
             codec_name = "libopus";
+            // Libav's libfdk-aac wrapper expects back channels for 5.1
+            // audio, and will error out unless we translate the layout
+            if (channel_layout == AV_CH_LAYOUT_5POINT1)
+                channel_layout  = AV_CH_LAYOUT_5POINT1_BACK;
             break;
 
         default: