diff options
author | Satya Prakash Gupta <sp.gupta@samsung.com> | 2017-07-11 13:45:35 +0530 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2017-07-17 15:36:49 +0300 |
commit | 7c304c0c1ed37cac2001aa9ecd7ebd6a8715a042 (patch) | |
tree | 499ff445269be8304306a868952923c51082929a | |
parent | 98cf1a7e2d27d84041bd4d9a9252d55c1252d010 (diff) | |
download | gst-libav-7c304c0c1ed37cac2001aa9ecd7ebd6a8715a042.tar.gz |
libswscale: Memory leak in gst_video_frame_map
https://bugzilla.gnome.org/show_bug.cgi?id=784741
-rw-r--r-- | ext/libswscale/gstffmpegscale.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/libswscale/gstffmpegscale.c b/ext/libswscale/gstffmpegscale.c index e89e288..e7ee443 100644 --- a/ext/libswscale/gstffmpegscale.c +++ b/ext/libswscale/gstffmpegscale.c @@ -594,8 +594,10 @@ gst_ffmpegscale_transform (GstBaseTransform * trans, GstBuffer * inbuf, goto invalid_buffer; if (!gst_video_frame_map (&out_frame, &scale->out_info, outbuf, - GST_MAP_WRITE)) + GST_MAP_WRITE)) { + gst_video_frame_unmap (&in_frame); goto invalid_buffer; + } sws_scale (scale->ctx, (const guint8 **) in_frame.data, in_frame.info.stride, 0, scale->in_info.height, (guint8 **) out_frame.data, |