projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e1b64d9
)
basesink: use dts and pts for sync
author
Wim Taymans
<wim.taymans@collabora.co.uk>
Sat, 3 Dec 2011 06:06:11 +0000
(07:06 +0100)
committer
Wim Taymans
<wim.taymans@collabora.co.uk>
Sat, 3 Dec 2011 06:06:11 +0000
(07:06 +0100)
First use DTS, then fall back to PTS for synchronization.
libs/gst/base/gstbasesink.c
patch
|
blob
|
history
diff --git
a/libs/gst/base/gstbasesink.c
b/libs/gst/base/gstbasesink.c
index
121a539
..
30a2c54
100644
(file)
--- a/
libs/gst/base/gstbasesink.c
+++ b/
libs/gst/base/gstbasesink.c
@@
-3031,9
+3031,12
@@
gst_base_sink_default_get_times (GstBaseSink * basesink, GstBuffer * buffer,
{
GstClockTime timestamp, duration;
- timestamp = GST_BUFFER_TIMESTAMP (buffer);
- if (GST_CLOCK_TIME_IS_VALID (timestamp)) {
+ /* first sync on DTS, else use PTS */
+ timestamp = GST_BUFFER_DTS (buffer);
+ if (!GST_CLOCK_TIME_IS_VALID (timestamp))
+ timestamp = GST_BUFFER_PTS (buffer);
+ if (GST_CLOCK_TIME_IS_VALID (timestamp)) {
/* get duration to calculate end time */
duration = GST_BUFFER_DURATION (buffer);
if (GST_CLOCK_TIME_IS_VALID (duration)) {