GNOME Bugzilla – Bug 503308
Changing tempo using pitch plugin doesn't update length info
Last modified: 2008-01-26 15:20:47 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
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?
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.