Revision 5210529e libavcodec/vp56.c

View differences:

libavcodec/vp56.c
499 499
{
500 500
    vp56_context_t *s = avctx->priv_data;
501 501
    AVFrame *const p = s->framep[VP56_FRAME_CURRENT];
502
    int remaining_buf_size = buf_size;
502 503
    int is_alpha, alpha_offset;
503 504

  
504 505
    if (s->has_alpha) {
505 506
        alpha_offset = bytestream_get_be24(&buf);
506
        buf_size -= 3;
507
        remaining_buf_size -= 3;
507 508
    }
508 509

  
509 510
    for (is_alpha=0; is_alpha < 1+s->has_alpha; is_alpha++) {
......
514 515

  
515 516
        s->modelp = &s->models[is_alpha];
516 517

  
517
        res = s->parse_header(s, buf, buf_size, &golden_frame);
518
        res = s->parse_header(s, buf, remaining_buf_size, &golden_frame);
518 519
        if (!res)
519 520
            return -1;
520 521

  
......
619 620
            FFSWAP(AVFrame *, s->framep[VP56_FRAME_GOLDEN],
620 621
                              s->framep[VP56_FRAME_GOLDEN2]);
621 622
            buf += alpha_offset;
622
            buf_size -= alpha_offset;
623
            remaining_buf_size -= alpha_offset;
623 624
        }
624 625
    }
625 626

  

Also available in: Unified diff