From 692206d3a743e851286bf5c272e33f535d13174f Mon Sep 17 00:00:00 2001 From: David Svensson Fors Date: Thu, 27 Jun 2013 07:40:29 +0200 Subject: [PATCH] rtph264pay: avoid double buffer unmap on error Fixes https://bugzilla.gnome.org/show_bug.cgi?id=703171 --- gst/rtp/gstrtph264pay.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst/rtp/gstrtph264pay.c b/gst/rtp/gstrtph264pay.c index 1929117..79727ba 100644 --- a/gst/rtp/gstrtph264pay.c +++ b/gst/rtp/gstrtph264pay.c @@ -556,10 +556,12 @@ gst_rtp_h264_pay_setcaps (GstRTPBasePayload * basepayload, GstCaps * caps) data += nal_size; size -= nal_size; } - gst_buffer_unmap (buffer, &map); + /* and update the caps with the collected data */ if (!gst_rtp_h264_pay_set_sps_pps (basepayload)) goto set_sps_pps_failed; + + gst_buffer_unmap (buffer, &map); } else { GST_DEBUG_OBJECT (rtph264pay, "have bytestream h264"); } -- 2.7.4