After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 753759 - liveadder: assertion on buffer copy region
liveadder: assertion on buffer copy region
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.5.2
Other Linux
: Normal normal
: 1.5.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-08-18 12:15 UTC by Guillaume Marquebielle
Modified: 2015-08-18 20:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch fixing the issue (4.37 KB, patch)
2015-08-18 12:15 UTC, Guillaume Marquebielle
committed Details | Review

Description Guillaume Marquebielle 2015-08-18 12:15:30 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.
Comment 1 Olivier Crête 2015-08-18 20:38:24 UTC
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