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 503308 - Changing tempo using pitch plugin doesn't update length info
Changing tempo using pitch plugin doesn't update length info
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
0.10.13
Other All
: Normal normal
: 0.10.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-12-12 20:10 UTC by Richi Plana
Modified: 2008-01-26 15:20 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18



Description Richi Plana 2007-12-12 20:10:51 UTC
Please describe the problem:
when I play audio using the gstreamer pitch plugin to change the tempo, gstreamer mistakenly assumes the length of the audio source is still the same. So if tempo is slowed down, the song ends playing prematurely.

This might also affect arbitrary repositioning, as well. I notice that when I play audio files with the pitch plugin enabled, the audio app (exaile) cannot do an arbitrary repositioning of playback pointer. If it's unrelated, I can create another bug report.

Steps to reproduce:
1. Do a:

$ gst-launch uridecodebin uri=file://`pwd`/"${fname}" ! pitch tempo=0.8 ! audioconvert ! alsasink

(use any tempo < 1)

2. The audio playback should get terminated prematurely


Actual results:


Expected results:


Does this happen every time?


Other information:
gstreamer = 0.10.13
gstreamer-plugins-bad = 0.10.5
soundtouch = 1.3.1
Comment 1 Richi Plana 2007-12-12 20:13:05 UTC
If you use time(1) to check the duration of playback, you'll see that it corresponds to the length of the original music file's length. Perhaps the pitch plugin isn't signalling a change in length?
Comment 2 Sebastian Dröge (slomo) 2008-01-26 15:20:47 UTC
Thanks for reporting. This should be fixed in CVS now.

2008-01-26  Sebastian Dröge  <slomo@circular-chaos.org>

        * ext/soundtouch/gstpitch.cc:
        Allow seeking only in TIME and DEFAULT format, other formats will
        not work as expected. Also handle a stop position of -1 correctly
        for seeks, newsegment events and the queries. This fixes playback
        with the pitch element if upstream doesn't know the duration or has
        -1 as stop position in NEWSEGMENT events for other reasons. Before
        simply nothing was played as the segment was going from 0 to 0.

        Send a GST_MESSAGE_DURATION whenever the rate or tempo is changed
        so applications can update their cached duration. Fixes bug #503308.

        Some random cleanup and memory leak closing.