Module: libav
Branch: release/11
Commit: 34f4d09a77fe2f8f677bf32b6fecfeb4a4fe9182

Author:    Alex Converse <alex.conve...@gmail.com>
Committer: Sean McGovern <gsean...@gmail.com>
Date:      Mon Mar 20 12:44:42 2017 -0700

aacsbr: Turnoff in the event of over read.

Aliased compressed AAC bytes are almost certainly not meaningful SBR
data. In the wild this causes harsh artifacts switching HE-AAC streams
that don't have SBR headers aligned with segment boundaries.

Turning off SBR falls back to a default set of upsampling parameters
that can function as a sort of error concealment. This is consistent
with how the decoder handles other sorts of errors.

Bug-Id: 1047
CC: libav-sta...@libav.org

Signed-off-by: Sean McGovern <gsean...@gmail.com>

---

 libavcodec/aacsbr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c
index 7d156e5..20c7e93 100644
--- a/libavcodec/aacsbr.c
+++ b/libavcodec/aacsbr.c
@@ -1104,6 +1104,7 @@ int ff_decode_sbr_extension(AACContext *ac, 
SpectralBandReplication *sbr,
     if (bytes_read > cnt) {
         av_log(ac->avctx, AV_LOG_ERROR,
                "Expected to read %d SBR bytes actually read %d.\n", cnt, 
bytes_read);
+        sbr_turnoff(sbr);
     }
     return cnt;
 }

_______________________________________________
libav-commits mailing list
libav-commits@libav.org
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to