summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/mas/massink.c7
-rw-r--r--ext/sdl/sdlvideosink.c9
2 files changed, 4 insertions, 12 deletions
diff --git a/ext/mas/massink.c b/ext/mas/massink.c
index 01eed9e6..376cc862 100644
--- a/ext/mas/massink.c
+++ b/ext/mas/massink.c
@@ -225,12 +225,9 @@ gst_massink_chain (GstPad *pad, GstData *_data)
GstMassink *massink = GST_MASSINK (gst_pad_get_parent (pad));
- if (massink->clock) {
- GstClockID id = gst_clock_new_single_shot_id (massink->clock, GST_BUFFER_TIMESTAMP (buf));
-
+ if (massink->clock && GST_BUFFER_TIMESTAMP_IS_VALID (buf)) {
GST_DEBUG ("massink: clock wait: %llu\n", GST_BUFFER_TIMESTAMP (buf));
- gst_element_clock_wait (GST_ELEMENT (massink), id, NULL);
- gst_clock_id_free (id);
+ gst_element_wait (GST_ELEMENT (massink), GST_BUFFER_TIMESTAMP (buf));
}
if (GST_BUFFER_DATA (buf) != NULL) {
diff --git a/ext/sdl/sdlvideosink.c b/ext/sdl/sdlvideosink.c
index 1e3e2f6e..a5fa4704 100644
--- a/ext/sdl/sdlvideosink.c
+++ b/ext/sdl/sdlvideosink.c
@@ -562,13 +562,8 @@ gst_sdlvideosink_chain (GstPad *pad, GstData *_data)
return;
}
- if (GST_VIDEOSINK_CLOCK (sdlvideosink)) {
- GstClockID id = gst_clock_new_single_shot_id (
- GST_VIDEOSINK_CLOCK (sdlvideosink),
- GST_BUFFER_TIMESTAMP (buf));
-
- gst_element_clock_wait (GST_ELEMENT (sdlvideosink), id, NULL);
- gst_clock_id_free (id);
+ if (GST_VIDEOSINK_CLOCK (sdlvideosink) && GST_BUFFER_TIMESTAMP_IS_VALID (buf)) {
+ gst_element_wait (GST_ELEMENT (sdlvideosink), GST_BUFFER_TIMESTAMP (buf));
}
if (GST_BUFFER_DATA (buf) != sdlvideosink->overlay->pixels[0]) {