diff options
author | Alex Converse <alex.converse@gmail.com> | 2017-03-20 12:44:42 -0700 |
---|---|---|
committer | Sean McGovern <gseanmcg@gmail.com> | 2017-05-03 19:00:03 -0400 |
commit | 504403ab28688588fb85817ad58964482f67f29f (patch) | |
tree | 46db55edb9ae71f2cefb5b9a911d4f1edd2b26e4 /libavcodec | |
parent | b5f19f7478492307e4b4763aeac3180faf50e17f (diff) | |
download | ffmpeg-streaming-504403ab28688588fb85817ad58964482f67f29f.zip ffmpeg-streaming-504403ab28688588fb85817ad58964482f67f29f.tar.gz |
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-stable@libav.org
Signed-off-by: Sean McGovern <gseanmcg@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/aacsbr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c index 99f7b08..d9bbe5e 100644 --- a/libavcodec/aacsbr.c +++ b/libavcodec/aacsbr.c @@ -1097,6 +1097,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; } |