diff options
author | Luis de Bethencourt <luis@debethencourt.com> | 2015-08-14 15:08:08 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2016-02-16 00:24:41 +0000 |
commit | f2bae3ab5936271b12f92aefdd0cba559c79ecab (patch) | |
tree | 6e094db173ae9d472a25238698748ec2ac3651fb /gst | |
parent | f1e284943886fd282aae3fe83c267e2b9623b04e (diff) |
rtph265pay: fix buffer leak when using SPS/PPS
Fixes a buffer leak that would occur if the pipeline was shutdown while a
SPS/PPS header was being created.
https://bugzilla.gnome.org/show_bug.cgi?id=741271
Diffstat (limited to 'gst')
-rw-r--r-- | gst/rtp/gstrtph265pay.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gst/rtp/gstrtph265pay.c b/gst/rtp/gstrtph265pay.c index 0cd8b871b..0a5bac611 100644 --- a/gst/rtp/gstrtph265pay.c +++ b/gst/rtp/gstrtph265pay.c @@ -995,8 +995,10 @@ gst_rtp_h265_pay_payload_nal (GstRTPBasePayload * basepayload, * checking when we need to send SPS/PPS but convert to running_time first. */ rtph265pay->send_vps_sps_pps = FALSE; ret = gst_rtp_h265_pay_send_vps_sps_pps (basepayload, rtph265pay, dts, pts); - if (ret != GST_FLOW_OK) + if (ret != GST_FLOW_OK) { + gst_buffer_unref (paybuf); return ret; + } } packet_len = gst_rtp_buffer_calc_packet_len (size, 0, 0); |