mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/cook: fix deadlock by using get_unary()
Fixes #3089. Reported-by: Piotr Bandurski <ami_stuff@o2.pl> Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
387e76f993
commit
65988b9916
@ -51,6 +51,7 @@
|
||||
#include "fft.h"
|
||||
#include "internal.h"
|
||||
#include "sinewin.h"
|
||||
#include "unary.h"
|
||||
|
||||
#include "cookdata.h"
|
||||
|
||||
@ -331,11 +332,7 @@ static void decode_gain_info(GetBitContext *gb, int *gaininfo)
|
||||
{
|
||||
int i, n;
|
||||
|
||||
while (get_bits1(gb)) {
|
||||
/* NOTHING */
|
||||
}
|
||||
|
||||
n = get_bits_count(gb) - 1; // amount of elements*2 to update
|
||||
n = get_unary(gb, 0, get_bits_left(gb)); // amount of elements*2 to update
|
||||
|
||||
i = 0;
|
||||
while (n--) {
|
||||
|
Loading…
Reference in New Issue
Block a user