diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-03-21 13:54:04 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-21 13:54:04 +0100 |
commit | 4257b804e2354db07e66ebfd966d7d13f49c7895 (patch) | |
tree | c33fbe3ef3fe68ff196094483aa9a7d7fc6b53b4 /ffmpeg_filter.c | |
parent | f3980b75f82b83217260c50e71db8606390a2340 (diff) | |
download | ffmpeg-4257b804e2354db07e66ebfd966d7d13f49c7895.tar.gz |
ffmpeg: Replace -deinterlace (which was broken by the buffer ref stuff) with yadif injection
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg_filter.c')
-rw-r--r-- | ffmpeg_filter.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c index 056b1df1c1..654c19d4c3 100644 --- a/ffmpeg_filter.c +++ b/ffmpeg_filter.c @@ -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; |