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