ffmpeg: Replace -deinterlace (which was broken by the buffer ref stuff) with yadif injection

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2013-03-21 13:54:04 +01:00
parent f3980b75f8
commit 4257b804e2
3 changed files with 19 additions and 58 deletions

View File

@ -604,6 +604,24 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
pad_idx = 0;
}
if (do_deinterlace) {
AVFilterContext *yadif;
snprintf(name, sizeof(name), "deinterlace input from stream %d:%d",
ist->file_index, ist->st->index);
if ((ret = avfilter_graph_create_filter(&yadif,
avfilter_get_by_name("yadif"),
name, "", NULL,
fg->graph)) < 0)
return ret;
if ((ret = avfilter_link(yadif, 0, first_filter, pad_idx)) < 0)
return ret;
first_filter = yadif;
pad_idx = 0;
}
if ((ret = avfilter_link(ifilter->filter, 0, first_filter, pad_idx)) < 0)
return ret;
return 0;