History

avcodec/ffv1dec: don't add offsets to NULL pointers

James Almer committed 1 year ago

Commit 9c55f221 parent 307983b1 file · +6 −4Browse files

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

Unified · Split

libavcodec/ffv1dec.c+6−4
@@ -444,14 +444,16 @@ static int decode_slice(AVCodecContext *c, void *arg) · 443 unmodified lines
444 } else if (f->use32bit) {444 } else if (f->use32bit) {
445 uint8_t *planes[4] = { p->data[0] + ps * x + y * p->linesize[0],445 uint8_t *planes[4] = { p->data[0] + ps * x + y * p->linesize[0],
446 p->data[1] + ps * x + y * p->linesize[1],446 p->data[1] + ps * x + y * p->linesize[1],
447 p->data[2] + ps * x + y * p->linesize[2],447 p->data[2] + ps * x + y * p->linesize[2] };
448 p->data[3] + ps * x + y * p->linesize[3] };448 if (f->transparency)
449 planes[3] = p->data[3] + ps * x + y * p->linesize[3];
449 decode_rgb_frame32(f, sc, &gb, planes, width, height, p->linesize);450 decode_rgb_frame32(f, sc, &gb, planes, width, height, p->linesize);
450 } else {451 } else {
451 uint8_t *planes[4] = { p->data[0] + ps * x + y * p->linesize[0],452 uint8_t *planes[4] = { p->data[0] + ps * x + y * p->linesize[0],
452 p->data[1] + ps * x + y * p->linesize[1],453 p->data[1] + ps * x + y * p->linesize[1],
453 p->data[2] + ps * x + y * p->linesize[2],454 p->data[2] + ps * x + y * p->linesize[2] };
454 p->data[3] + ps * x + y * p->linesize[3] };455 if (f->transparency)
456 planes[3] = p->data[3] + ps * x + y * p->linesize[3];
455 decode_rgb_frame(f, sc, &gb, planes, width, height, p->linesize);457 decode_rgb_frame(f, sc, &gb, planes, width, height, p->linesize);
456 }458 }
457 if (ac != AC_GOLOMB_RICE && f->version > 2) {459 if (ac != AC_GOLOMB_RICE && f->version > 2) {

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