From 5cf883c8ed6bbecd4ceb8e62d5109d1092ba385f Mon Sep 17 00:00:00 2001 From: Satya Prakash Gupta Date: Mon, 24 Jul 2017 19:18:49 +0530 Subject: [PATCH] videofilter: Unmap input frame if mapping output frame failed https://bugzilla.gnome.org/show_bug.cgi?id=785341 --- gst-libs/gst/video/gstvideofilter.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/video/gstvideofilter.c b/gst-libs/gst/video/gstvideofilter.c index 9fd217530f..408750673e 100644 --- a/gst-libs/gst/video/gstvideofilter.c +++ b/gst-libs/gst/video/gstvideofilter.c @@ -262,9 +262,10 @@ gst_video_filter_transform (GstBaseTransform * trans, GstBuffer * inbuf, goto invalid_buffer; if (!gst_video_frame_map (&out_frame, &filter->out_info, outbuf, - GST_MAP_WRITE | GST_VIDEO_FRAME_MAP_FLAG_NO_REF)) + GST_MAP_WRITE | GST_VIDEO_FRAME_MAP_FLAG_NO_REF)) { + gst_video_frame_unmap (&in_frame); goto invalid_buffer; - + } res = fclass->transform_frame (filter, &in_frame, &out_frame); gst_video_frame_unmap (&out_frame);