Revision 15ba015f

View differences:

libavfilter/vf_vflip.c
63 63
static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
64 64
{
65 65
    FlipContext *flip = link->dst->priv;
66
    AVFilterPicRef *ref2 = avfilter_ref_pic(picref, ~0);
67 66
    int i;
68 67

  
69 68
    for (i = 0; i < 4; i ++) {
70 69
        int vsub = i == 1 || i == 2 ? flip->vsub : 0;
71 70

  
72
        if (ref2->data[i]) {
73
            ref2->data[i] += ((link->h >> vsub)-1) * ref2->linesize[i];
74
            ref2->linesize[i] = -ref2->linesize[i];
71
        if (picref->data[i]) {
72
            picref->data[i] += ((link->h >> vsub)-1) * picref->linesize[i];
73
            picref->linesize[i] = -picref->linesize[i];
75 74
        }
76 75
    }
77 76

  
78
    avfilter_start_frame(link->dst->outputs[0], ref2);
77
    avfilter_start_frame(link->dst->outputs[0], picref);
79 78
}
80 79

  
81 80
static void draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
......
96 95
                                    .get_video_buffer = get_video_buffer,
97 96
                                    .start_frame      = start_frame,
98 97
                                    .draw_slice       = draw_slice,
98
                                    .end_frame        = avfilter_null_end_frame,
99 99
                                    .config_props     = config_input, },
100 100
                                  { .name = NULL}},
101 101
    .outputs   = (AVFilterPad[]) {{ .name             = "default",

Also available in: Unified diff