[Bug 708345] New: liveadder: round when calculation length from duration

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Sep 18 23:48:12 PDT 2013


https://bugzilla.gnome.org/show_bug.cgi?id=708345
  GStreamer | gst-plugins-bad | git

           Summary: liveadder: round when calculation length from duration
    Classification: Platform
           Product: GStreamer
           Version: git
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-bad
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: m.olbrich at pengutronix.de
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


Created an attachment (id=255272)
 --> (https://bugzilla.gnome.org/attachment.cgi?id=255272)
patch

liveadder sometimes calculates the offsets incorrectly before adding. The 
resulting errors can easily be heard when mixing silence with a sine. 
I'm not sure what the exact conditions are to trigger this, but it definitively
happens when the buffers of two streams have a different duration and buffer
length and duration don't match exactly for one stream because of rounding
errors (e.g.  duration=0:00:00.021333333)

I have to admit, I got lost in the math somewhere but it seems that not 
rounding in gst_live_adder_length_from_duration() causes 1 sample overlaps in
consecutive buffers from the same stream.
When using gst_util_uint64_scale_int_round() instead of just truncating the 
sine sound correctly again.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list