summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2019-05-08 11:29:06 -0600
committerJohn Stebbins <[email protected]>2019-05-08 11:31:43 -0600
commitbafd0c3dfd1e6a23da7389b1d9c783d3b489861c (patch)
tree1655cad7851a72ea05088c1817f03b6df47b4f2b /libhb
parent465d9f76d97b973afeece3f87677be0fc8ff9fcd (diff)
hbavfilter: fix jerkey deinterlace output
The deinterlace filter returns previous frames sometimes if output frames are not unref'd as they are used. Fixes https://github.com/HandBrake/HandBrake/issues/2087
Diffstat (limited to 'libhb')
-rw-r--r--libhb/hbavfilter.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libhb/hbavfilter.c b/libhb/hbavfilter.c
index 36e34c424..1669dab0b 100644
--- a/libhb/hbavfilter.c
+++ b/libhb/hbavfilter.c
@@ -240,7 +240,10 @@ hb_buffer_t * hb_avfilter_get_buf(hb_avfilter_graph_t * graph)
result = av_buffersink_get_frame(graph->output, graph->frame);
if (result >= 0)
{
- return hb_avframe_to_video_buffer(graph->frame, graph->out_time_base);
+ hb_buffer_t * buf;
+ buf = hb_avframe_to_video_buffer(graph->frame, graph->out_time_base);
+ av_frame_unref(graph->frame);
+ return buf;
}
return NULL;