summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
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;