diff options
author | Ilya Smelykh <ilya@videoexpertsgroup.com> | 2019-03-20 19:45:12 +0700 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2019-05-02 11:00:50 +0100 |
commit | a2dab9727cd225f79ef0d385bcf0cbda25618566 (patch) | |
tree | c8e8002f16389e98dc7c0d91381c13e711b40105 | |
parent | e80d9ea6ee2cfdcc1f84159e6f57d573d0bd4fde (diff) | |
download | gstreamer-plugins-bad-a2dab9727cd225f79ef0d385bcf0cbda25618566.tar.gz |
rtmpsrc: fix buffer leak on read error or EOS
-rw-r--r-- | ext/rtmp/gstrtmpsrc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/rtmp/gstrtmpsrc.c b/ext/rtmp/gstrtmpsrc.c index 12931a2a3..0ad97abef 100644 --- a/ext/rtmp/gstrtmpsrc.c +++ b/ext/rtmp/gstrtmpsrc.c @@ -405,12 +405,14 @@ gst_rtmp_src_create (GstPushSrc * pushsrc, GstBuffer ** buffer) read_failed: { + gst_buffer_unmap (buf, &map); gst_buffer_unref (buf); GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL), ("Failed to read data")); return GST_FLOW_ERROR; } eos: { + gst_buffer_unmap (buf, &map); gst_buffer_unref (buf); if (src->cur_offset == 0) { GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL), |