History

avcodec/rv60dec: drop unused sum variable in read_slice_sizes

Peter Ross committed 1 year ago

Commit 09cd38e1 parent 0ffe97d1 file · +3 −4Browse files

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

Unified · Split

libavcodec/rv60dec.c+3−4
@@ -390,14 +390,14 @@ static int read_frame_header(RV60Context *s, GetBitContext *gb, int * width, int · 389 unmodified lines
390390 static int read_slice_sizes(RV60Context *s, GetBitContext *gb)
391391 {
392392 int nbits = get_bits(gb, 5) + 1;
393− int last_size, sum = 0;
393+ int last_size;
394394
395395 for (int i = 0; i < s->cu_height; i++)
396396 s->slice[i].sign = get_bits1(gb);
397397
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);
399399
400− if (sum < 0)
400+ if (last_size < 0)
401401 return AVERROR_INVALIDDATA;
402402
403403 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
409409 if (last_size <= 0)
410410 return AVERROR_INVALIDDATA;
411411 s->slice[i].size = last_size;
412− sum += s->slice[i].size;
413412 }
414413
415414 align_get_bits(gb);

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