Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avcodec/libopusenc: Allow 5.1(side) channel inputs #386

Merged
merged 2 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions debian/patches/0073-opus-allow-5point1-side-inputs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Subject: [PATCH] avcodec/libopusenc: Allow 5.1(side) channel inputs
---
Index: libavcodec/libopusenc.c
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/libavcodec/libopusenc.c b/libavcodec/libopusenc.c
--- a/libavcodec/libopusenc.c (revision 38aaefefec762dd185b631298752d489dcf084fe)
+++ b/libavcodec/libopusenc.c (revision 104006c9a93f3cd72b21b243884ea91449cbdd10)
@@ -196,6 +196,10 @@
av_log(avctx, AV_LOG_WARNING,
"No channel layout specified. Opus encoder will use Vorbis "
"channel layout for %d channels.\n", avctx->ch_layout.nb_channels);
+ } else if (av_channel_layout_compare(&avctx->ch_layout, &(AVChannelLayout)AV_CHANNEL_LAYOUT_5POINT1) == 0) {
+ av_log(avctx, AV_LOG_WARNING,
+ "Input channel layout 5.1(side) detected, side channels will be mapped to back channels.\n");
+ return 0;
} else if (av_channel_layout_compare(&avctx->ch_layout, &ff_vorbis_ch_layouts[avctx->ch_layout.nb_channels - 1])) {
char name[32];

1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@
0070-add-customized-surf-align-for-amd-vaapi.patch
0071-check-pciid-when-deriving-from-va-to-vk.patch
0072-add-mjpeg-videotoolbox.patch
0073-opus-allow-5point1-side-inputs.patch