History

aaccoder: prevent crash of anmr coder

If minq is negative, the range of sf_idx can be larger than SCALE_MAX_DIFF allows, causing assertion failures later in encode_scale_factors.

Andreas Cadhalpun committed 10 years ago

Commit 7a4652d1 parent 325b5931 file · +1 −1Browse files

Showing the changes to libavcodec/aaccoder.c (1 of 1 file). Show all

Unified · Split

libavcodec/aaccoder.c+1−1
@@ -370,7 +370,7 @@ static void search_for_quantizers_anmr(AVCodecContext *avctx, AACEncContext *s, · 369 unmodified lines
370 }370 }
371 while (idx) {371 while (idx) {
372 sce->sf_idx[bandaddr[idx]] = minq + q0;372 sce->sf_idx[bandaddr[idx]] = minq + q0;
373 minq = paths[idx][minq].prev;373 minq = FFMAX(paths[idx][minq].prev, 0);
374 idx--;374 idx--;
375 }375 }
376 //set the same quantizers inside window groups376 //set the same quantizers inside window groups

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