avcodec/vorbisdec: Dont treat overread as error
This differs from libvorbis by stddev: 2.44 PSNR: 88.58 MAXDIFF: 41 bytes: 834304/ 834304 for the file from the ticket Fixes: Ticket11427 Regression since:dc89cf804aThis is a similar solution to what james proposed earlier in [FFmpeg-devel] [PATCH] avcodec/vorbisdec: don't abort on EOD when decoding residuals Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commitfd5a3c5fed) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
d553897a10
commit
fef450f3c5
1 changed files with 4 additions and 2 deletions
|
|
@ -1451,8 +1451,10 @@ static av_always_inline int vorbis_residue_decode_internal(vorbis_context *vc,
|
|||
unsigned step = FASTDIV(vr->partition_size << 1, dim << 1);
|
||||
vorbis_codebook codebook = vc->codebooks[vqbook];
|
||||
|
||||
if (get_bits_left(gb) <= 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
if (get_bits_left(gb) < 0) {
|
||||
av_log(vc->avctx, AV_LOG_ERROR, "Overread %d bits\n", -get_bits_left(gb));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (vr_type == 0) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue