mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
pitch: fix time ratio computation
When changing playing rate, the output segment was not correctly calculated because the stream time ratio was computed using the previous input segment rate instead of using the actual rate. This was producing wrong results for the output segment start and end values. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6247>
This commit is contained in:
parent
d5734159d1
commit
7f4c0e6fb1
1 changed files with 1 additions and 1 deletions
|
@ -711,7 +711,7 @@ gst_pitch_process_segment (GstPitch * pitch, GstEvent ** event)
|
|||
|
||||
GST_LOG_OBJECT (pitch->sinkpad, "in segment %" GST_SEGMENT_FORMAT, &seg);
|
||||
|
||||
stream_time_ratio = pitch->tempo * pitch->rate * pitch->seg_arate;
|
||||
stream_time_ratio = pitch->tempo * pitch->rate * our_arate;
|
||||
|
||||
if (stream_time_ratio == 0) {
|
||||
GST_LOG_OBJECT (pitch->sinkpad, "stream_time_ratio is zero");
|
||||
|
|
Loading…
Reference in a new issue