summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorKM <the.real.laplace@gmail.com>2021-02-16 23:19:19 +0100
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2021-02-16 23:37:31 +0100
commitfbe9b0c8f3ee1ff1d36c6a6cd7fe6fc0c6a9e80d (patch)
tree6f8bb135945e858c3d0a0fe20f86fe5b2455bf3e /libavcodec
parentc38ab8f30fde3155c2be790bf9d2ee1886e196ae (diff)
lavc/aacdec_template: Fix 7.1 decoding with default strictness.
Broken in 4d9b9c5e Fixes ticket #9057.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/aacdec_template.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c
index e5d311141f..aa89f7cbb8 100644
--- a/libavcodec/aacdec_template.c
+++ b/libavcodec/aacdec_template.c
@@ -639,11 +639,14 @@ static int set_default_channel_config(AACContext *ac, AVCodecContext *avctx,
* As actual intended 7.1(wide) streams are very rare, default to assuming a
* 7.1 layout was intended.
*/
- if (channel_config == 7 && avctx->strict_std_compliance < FF_COMPLIANCE_STRICT && (!ac || !ac->warned_71_wide++)) {
- av_log(avctx, AV_LOG_INFO, "Assuming an incorrectly encoded 7.1 channel layout"
- " instead of a spec-compliant 7.1(wide) layout, use -strict %d to decode"
- " according to the specification instead.\n", FF_COMPLIANCE_STRICT);
+ if (channel_config == 7 && avctx->strict_std_compliance < FF_COMPLIANCE_STRICT) {
layout_map[2][2] = AAC_CHANNEL_SIDE;
+
+ if (!ac || !ac->warned_71_wide++) {
+ av_log(avctx, AV_LOG_INFO, "Assuming an incorrectly encoded 7.1 channel layout"
+ " instead of a spec-compliant 7.1(wide) layout, use -strict %d to decode"
+ " according to the specification instead.\n", FF_COMPLIANCE_STRICT);
+ }
}
return 0;