Revision dc172ecc ffplay.c

View differences:

ffplay.c
1582 1582
    int perms = AV_PERM_WRITE;
1583 1583
    int i, w, h, stride[4];
1584 1584
    unsigned edge;
1585
    int pixel_size;
1585 1586

  
1586 1587
    av_assert0(codec->flags & CODEC_FLAG_EMU_EDGE);
1587 1588

  
......
1609 1610
    if(!(ref = avfilter_get_video_buffer(ctx->outputs[0], perms, w, h)))
1610 1611
        return -1;
1611 1612

  
1613
    pixel_size = av_pix_fmt_descriptors[ref->format].comp[0].step_minus1+1;
1612 1614
    ref->video->w = codec->width;
1613 1615
    ref->video->h = codec->height;
1614 1616
    for(i = 0; i < 4; i ++) {
......
1616 1618
        unsigned vshift = (i == 1 || i == 2) ? av_pix_fmt_descriptors[ref->format].log2_chroma_h : 0;
1617 1619

  
1618 1620
        if (ref->data[i]) {
1619
            ref->data[i]    += (edge >> hshift) + ((edge * ref->linesize[i]) >> vshift);
1621
            ref->data[i]    += ((edge * pixel_size) >> hshift) + ((edge * ref->linesize[i]) >> vshift);
1620 1622
        }
1621 1623
        pic->data[i]     = ref->data[i];
1622 1624
        pic->linesize[i] = ref->linesize[i];

Also available in: Unified diff