Revision e84a0475

View differences:

libavcodec/qtrle.c
411 411
    int rle_code;
412 412
    int row_ptr, pixel_ptr;
413 413
    int row_inc = s->frame.linesize[0];
414
    unsigned char r, g, b;
414
    unsigned char a, r, g, b;
415 415
    unsigned int argb;
416 416
    unsigned char *rgb = s->frame.data[0];
417 417
    int pixel_limit = s->frame.linesize[0] * s->avctx->height;
......
455 455
                /* decode the run length code */
456 456
                rle_code = -rle_code;
457 457
                CHECK_STREAM_PTR(4);
458
                stream_ptr++;  /* skip the alpha (?) byte */
458
                a = s->buf[stream_ptr++];
459 459
                r = s->buf[stream_ptr++];
460 460
                g = s->buf[stream_ptr++];
461 461
                b = s->buf[stream_ptr++];
462
                argb = (r << 16) | (g << 8) | (b << 0);
462
                argb = (a << 24) | (r << 16) | (g << 8) | (b << 0);
463 463

  
464 464
                CHECK_PIXEL_PTR(rle_code * 4);
465 465

  
......
473 473

  
474 474
                /* copy pixels directly to output */
475 475
                while (rle_code--) {
476
                    stream_ptr++;  /* skip the alpha (?) byte */
476
                    a = s->buf[stream_ptr++];
477 477
                    r = s->buf[stream_ptr++];
478 478
                    g = s->buf[stream_ptr++];
479 479
                    b = s->buf[stream_ptr++];
480
                    argb = (r << 16) | (g << 8) | (b << 0);
480
                    argb = (a << 24) | (r << 16) | (g << 8) | (b << 0);
481 481
                    *(unsigned int *)(&rgb[pixel_ptr]) = argb;
482 482
                    pixel_ptr += 4;
483 483
                }

Also available in: Unified diff