History

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: dc89cf804a811c0d25f4649a99f7fab4b5b416fa This is a similar solution to what james proposed earlier in [FFmpeg-devel] [PATCH] avcodec/vorbisdec: don't abort on EOD when decoding residuals

Michael Niedermayer committed 1 year ago

Commit fd5a3c51 parent 8ce32a71 file · +4 −2Browse files

Unified · Split

libavcodec/vorbisdec.c+4−2
@@ -1469,8 +1469,10 @@ static av_always_inline int vorbis_residue_decode_internal(vorbis_context *vc, · 1468 unmodified lines
14691469 unsigned step = FASTDIV(vr->partition_size << 1, dim << 1);
14701470 vorbis_codebook codebook = vc->codebooks[vqbook];
14711471
1472− if (get_bits_left(gb) <= 0)
1473− return AVERROR_INVALIDDATA;
1472+ if (get_bits_left(gb) < 0) {
1473+ av_log(vc->avctx, AV_LOG_ERROR, "Overread %d bits\n", -get_bits_left(gb));
1474+ return 0;
1475+ }
14741476
14751477 if (vr_type == 0) {
14761478

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t