Revision 902d49ee libavfilter/vf_yadif.c

View differences:

libavfilter/vf_yadif.c
175 175

  
176 176
    filter(ctx, yadif->out, tff ^ !is_second, tff);
177 177

  
178
    if (is_second)
178
    if (is_second) {
179
        if (yadif->next->pts != AV_NOPTS_VALUE &&
180
            yadif->cur->pts != AV_NOPTS_VALUE) {
181
            yadif->out->pts =
182
                (yadif->next->pts&yadif->cur->pts) +
183
                ((yadif->next->pts^yadif->cur->pts)>>1);
184
        } else {
185
            yadif->out->pts = AV_NOPTS_VALUE;
186
        }
179 187
        avfilter_start_frame(ctx->outputs[0], yadif->out);
188
    }
180 189
    avfilter_draw_slice(ctx->outputs[0], 0, link->h, 1);
181 190
    avfilter_end_frame(ctx->outputs[0]);
182 191

  
......
206 215
    yadif->out = avfilter_get_video_buffer(ctx->outputs[0], AV_PERM_WRITE | AV_PERM_PRESERVE |
207 216
                                       AV_PERM_REUSE, link->w, link->h);
208 217

  
209
    yadif->out->pts = yadif->cur->pts;
218
    avfilter_copy_buffer_ref_props(yadif->out, yadif->cur);
219
    yadif->out->video->interlaced = 0;
210 220
    avfilter_start_frame(ctx->outputs[0], yadif->out);
211 221
}
212 222

  

Also available in: Unified diff