Revision 3628fbe0 libavfilter/avfilter.c

View differences:

libavfilter/avfilter.c
64 64

  
65 65
void avfilter_default_start_frame(AVFilterLink *link, AVFilterPicRef *picref)
66 66
{
67
    AVFilterLink *out = link->dst->outputs[0];
68

  
67 69
    link->cur_pic = picref;
70

  
71
    if(out) {
72
        out->outpic  = avfilter_get_video_buffer(out, AV_PERM_WRITE);
73
        avfilter_start_frame(out, avfilter_ref_pic(out->outpic, ~0));
74
    }
68 75
}
69 76

  
70 77
void avfilter_default_end_frame(AVFilterLink *link)
71 78
{
79
    AVFilterLink *out = link->dst->outputs[0];
80

  
72 81
    avfilter_unref_pic(link->cur_pic);
73 82
    link->cur_pic = NULL;
83

  
84
    if(out) {
85
        avfilter_unref_pic(out->outpic);
86
        out->outpic = NULL;
87
        avfilter_end_frame(out);
88
    }
74 89
}
75 90

  
76 91
AVFilterPicRef *avfilter_ref_pic(AVFilterPicRef *ref, int pmask)

Also available in: Unified diff