GNOME Bugzilla – Bug 774959
rtpbuffer: fix ensure_buffers
Last modified: 2016-11-26 22:36:05 UTC
Created attachment 340638 [details] [review] rtpbuffer: fix ensure_buffers I have noticed that when gst_rtp_buffer_add_extension_onebyte_header is used over a GstRtpBuffer that only contains a memory for the whole packet, ensure_buffers function crashes at the next point: mem = gst_memory_copy (rtp->map[i].memory, offset, rtp->size[i]); when i==2 because the payload is not mapped. In addition the offset is calculated subtracting in the wrong direction. The attached patch fixes these issues.
Created attachment 340646 [details] [review] rtpbuffer: fix ensure_buffers
Created attachment 340684 [details] [review] rtpbuffer: fix ensure_buffers Improve performance only mapping payload when is not mapped yet.
Created attachment 340740 [details] [review] rtpbuffer: fix ensure_buffers Fix previous patch
commit 036bdf5d2d44facdcf4116ac90d3df29cbd96b8d Author: Miguel Paris <mparisparis@gmail.com> Date: Fri Nov 25 10:48:06 2016 +0100 rtpbuffer: Fix ensure_buffers() if whole packet is in one GstMemory When gst_rtp_buffer_add_extension_onebyte_header() is used over a GstRtpBuffer that only contains a memory for the whole packet, ensure_buffers function crashes at the next point: mem = gst_memory_copy (rtp->map[i].memory, offset, rtp->size[i]); when i==2 because the payload is not mapped. In addition the offset is calculated subtracting in the wrong direction. https://bugzilla.gnome.org/show_bug.cgi?id=774959
Please write proper commit messages in the future :)
OK thanks @slomo ;)