mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
adder: set DTS and PTS, sync on DTS
This commit is contained in:
parent
a8df760c96
commit
a174ff25bc
1 changed files with 2 additions and 2 deletions
|
@ -1489,12 +1489,12 @@ gst_adder_collected (GstCollectPads * pads, gpointer user_data)
|
|||
|
||||
/* set timestamps on the output buffer */
|
||||
if (adder->segment.rate > 0.0) {
|
||||
GST_BUFFER_TIMESTAMP (outbuf) = adder->segment.position;
|
||||
GST_BUFFER_PTS (outbuf) = GST_BUFFER_DTS (outbuf) = adder->segment.position;
|
||||
GST_BUFFER_OFFSET (outbuf) = adder->offset;
|
||||
GST_BUFFER_OFFSET_END (outbuf) = next_offset;
|
||||
GST_BUFFER_DURATION (outbuf) = next_timestamp - adder->segment.position;
|
||||
} else {
|
||||
GST_BUFFER_TIMESTAMP (outbuf) = next_timestamp;
|
||||
GST_BUFFER_DTS (outbuf) = GST_BUFFER_PTS (outbuf) = next_timestamp;
|
||||
GST_BUFFER_OFFSET (outbuf) = next_offset;
|
||||
GST_BUFFER_OFFSET_END (outbuf) = adder->offset;
|
||||
GST_BUFFER_DURATION (outbuf) = adder->segment.position - next_timestamp;
|
||||
|
|
Loading…
Reference in a new issue