GNOME Bugzilla – Bug 753759
liveadder: assertion on buffer copy region
Last modified: 2015-08-18 20:38:38 UTC
Created attachment 309457 [details] [review] Patch fixing the issue In gst_live_adder_chain() function, calls to gst_buffer_copy_region() can lead to assertion as 'offset + size <= bufsize' is not respected. Indeed 'offset' and 'size' parameters are calculated through calling gst_live_adder_length_from_duration(), and thus gst_util_uint64_scale_int_round(). Depending on the nearest integers, rounded values 'offset' and 'size' can then trigger the assertion. This case mainly occurs when 'skip' value is > 0 in chain function process.
If you are using gstreamer 1.5.x or 1.6, you should look at "audiomixer" setting the latency property to non-0, the liveadder element will be deprecated and removed. That said, this patch is good, so I merged it: commit 30d58f46884e51db54f9ba45a1b02c63a107f17d Author: Guillaume Marquebielle <guillaume.marquebielle@parrot.com> Date: Tue Aug 18 13:56:59 2015 +0200 liveadder: fix assertion when copying buffer region In gst_live_adder_chain() function, calls to gst_buffer_copy_region() can lead to assertion as 'offset + size <= bufsize' is not respected. Indeed 'offset' and 'size' parameters are calculated through calling gst_live_adder_length_from_duration(), and thus gst_util_uint64_scale_int_round(). Depending on the nearest integers, rounded values 'offset' and 'size' can then trigger the assertion. This case mainly occurs when 'skip' value is > 0 in chain function process. https://bugzilla.gnome.org/show_bug.cgi?id=753759