mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
audiotestsrc: swap timestamps in forward and reverse mode.
In reverse mode we want use the next next timestamp (and not the other way around). Fixes the tests again. Also readd a log line that was dropped with previous commit.
This commit is contained in:
parent
764c899215
commit
45b39fcfc1
1 changed files with 4 additions and 2 deletions
|
@ -1081,14 +1081,16 @@ gst_audio_test_src_create (GstBaseSrc * basesrc, guint64 offset,
|
|||
src->samplerate);
|
||||
|
||||
GST_LOG_OBJECT (src, "samplerate %d", src->samplerate);
|
||||
GST_LOG_OBJECT (src, "next_sample %" G_GINT64_FORMAT ", ts %" GST_TIME_FORMAT,
|
||||
next_sample, GST_TIME_ARGS (next_time));
|
||||
|
||||
GST_BUFFER_OFFSET (buf) = src->next_sample;
|
||||
GST_BUFFER_OFFSET_END (buf) = next_sample;
|
||||
if (!src->reverse) {
|
||||
GST_BUFFER_TIMESTAMP (buf) = src->timestamp_offset + next_time;
|
||||
GST_BUFFER_TIMESTAMP (buf) = src->timestamp_offset + src->next_time;
|
||||
GST_BUFFER_DURATION (buf) = next_time - src->next_time;
|
||||
} else {
|
||||
GST_BUFFER_TIMESTAMP (buf) = src->timestamp_offset + src->next_time;
|
||||
GST_BUFFER_TIMESTAMP (buf) = src->timestamp_offset + next_time;
|
||||
GST_BUFFER_DURATION (buf) = src->next_time - next_time;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue