[Bug 676884] New: Wrong segment length for audiotestsrc

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sat May 26 07:40:00 PDT 2012


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

           Summary: Wrong segment length for audiotestsrc
    Classification: Platform
           Product: GStreamer
           Version: 0.10.36
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: ksb at kth.se
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


Created an attachment (id=215047)
 --> (https://bugzilla.gnome.org/attachment.cgi?id=215047)
Source for a program that writes a wav file of given length

The resulting segment length is incorrect when doing sample
(GST_FORMAT_DEFAULT) seek on audiotestsrc. The reason for this seems to be that
the sample index is first converted to nanoseconds (GST_FORMAT_TIME) and then
back to samples. Due to rounding errors this often produce one sample less than
intended. 
I suggest using gst_util_uint64_scale_int_round instead of
gst_util_uint64_scale_int in gstaudiotestsrc.c when converting from time to
samples.

I've attached a test program that should produce a sine tone in
/tmp/segment.wav with the length as given by the command line argument.
In reality the resulting file is often one sample short.

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