[Bug 665004] New: audioresample emits spurrious disconts

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun Nov 27 22:03:41 PST 2011


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

           Summary: audioresample emits spurrious disconts
    Classification: Platform
           Product: GStreamer
           Version: git
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: kcannon at cita.utoronto.ca
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


Created an attachment (id=202270)
 View: https://bugzilla.gnome.org/attachment.cgi?id=202270
 Review: https://bugzilla.gnome.org/review?bug=665004&attachment=202270

patch

audioresample is derived from GstBaseTransform, and one of GstBaseTransform's
traits is that if the derived element does not produce an output buffer from
some input buffer then the first output buffer after that gets flaged as a
discontinuity, whether or not the buffer actually is discontinuous from the
output buffer that preceded it.  When downsampling, the audioresample element
requires more than one input sample for each output sample, and if the ratio of
input to output sample rates is high enough and the input buffers short enough
it can come to pass that the resampler does not receive enough samples on its
input to produce any output.  Currently the resampler returns
GST_BASE_TRANSFORM_FLOW_DROPPED from the transform() method in this case,
causing the next buffer to be flagged as a discontinuity.  If subsequent
elements in the pipeline reset themselves on disconts, this can cause clicks
and other undesireable behaviour.

The attached patch causes the resampler to return 0-length buffers from
transform() method in this situation, instead of returning
GST_BASE_TRANSFORM_FLOW_DROPPED.  This "tricks" the parent class into believing
the output stream is continuous, fixing the spurrious discont flags.

git says the lines this patch removes were added in an earlier patch from me
that fixed a timestamp drift ... so, I haven't checked to see what the element
did originally, but there's a good chance I'm responsible for introducing the
bug.  Sorry about that.

PS --- it would be great if this could make it into the upcoming release.

-- 
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