Commit 65988b99 authored by Paul B Mahol's avatar Paul B Mahol

avcodec/cook: fix deadlock by using get_unary()

Fixes #3089.
Reported-by: 's avatarPiotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 387e76f9
......@@ -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--) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment