Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -390,14 +390,14 @@ static int read_frame_header(RV60Context *s, GetBitContext *gb, int * width, int · 389 unmodified lines | ||
| 390 | 390 | static int read_slice_sizes(RV60Context *s, GetBitContext *gb) |
| 391 | 391 | { |
| 392 | 392 | int nbits = get_bits(gb, 5) + 1; |
| 393 | − int last_size, sum = 0; | |
| 393 | + int last_size; | |
| 394 | 394 | |
| 395 | 395 | for (int i = 0; i < s->cu_height; i++) |
| 396 | 396 | s->slice[i].sign = get_bits1(gb); |
| 397 | 397 | |
| 398 | − s->slice[0].size = last_size = sum = get_bits_long(gb, nbits); | |
| 398 | + s->slice[0].size = last_size = get_bits_long(gb, nbits); | |
| 399 | 399 | |
| 400 | − if (sum < 0) | |
| 400 | + if (last_size < 0) | |
| 401 | 401 | return AVERROR_INVALIDDATA; |
| 402 | 402 | |
| 403 | 403 | for (int i = 1; i < s->cu_height; i++) { |
| @@ -409,7 +409,6 @@ static int read_slice_sizes(RV60Context *s, GetBitContext *gb) · 5 unmodified lines | ||
| 409 | 409 | if (last_size <= 0) |
| 410 | 410 | return AVERROR_INVALIDDATA; |
| 411 | 411 | s->slice[i].size = last_size; |
| 412 | − sum += s->slice[i].size; | |
| 413 | 412 | } |
| 414 | 413 | |
| 415 | 414 | align_get_bits(gb); |