rtph264pay: avoid double buffer unmap on error

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=703171
This commit is contained in:
David Svensson Fors 2013-06-27 07:40:29 +02:00 committed by Wim Taymans
parent 3289a2963b
commit 692206d3a7

View file

@ -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");
}