diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2010-09-26 00:56:26 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2010-09-26 00:56:26 +0000 |
commit | 48f7f29f52f3eeff2b200943834ac1e7461536e7 (patch) | |
tree | 84be5493943e6f07fa621ee95b07a116ccacca0e /libavfilter/vf_yadif.c | |
parent | b9f9e59afc4e32a326ad6b117166f0c82fd1cbac (diff) | |
download | ffmpeg-48f7f29f52f3eeff2b200943834ac1e7461536e7.tar.gz |
In yadif filter, use current frame when previous is missing,
better results for the first frame
Originally committed as revision 25202 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/vf_yadif.c')
-rw-r--r-- | libavfilter/vf_yadif.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c index 96cf73a377..fe4cb9601a 100644 --- a/libavfilter/vf_yadif.c +++ b/libavfilter/vf_yadif.c @@ -197,13 +197,12 @@ static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref) yadif->cur = yadif->next; yadif->next = picref; - if (!yadif->prev) - yadif->prev = avfilter_get_video_buffer(link, AV_PERM_WRITE | AV_PERM_PRESERVE | - AV_PERM_REUSE, link->w, link->h); - if(!yadif->cur) return; + if (!yadif->prev) + yadif->prev = avfilter_ref_buffer(yadif->cur, AV_PERM_READ); + yadif->out = avfilter_get_video_buffer(ctx->outputs[0], AV_PERM_WRITE | AV_PERM_PRESERVE | AV_PERM_REUSE, link->w, link->h); |