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>
This commit is contained in:
Alex Converse 2017-03-20 12:44:42 -07:00 committed by Sean McGovern
parent b5f19f7478
commit 504403ab28
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}