summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d955cfe)
raw | patch | inline | side by side (parent: d955cfe)
author | Alessandro Decina <alessandro.decina@collabora.co.uk> | |
Thu, 16 Feb 2012 17:08:15 +0000 (18:08 +0100) | ||
committer | Alessandro Decina <alessandro.decina@collabora.co.uk> | |
Thu, 16 Feb 2012 17:08:15 +0000 (18:08 +0100) |
Add wait_keyframe variable that is set to TRUE whenever we need to skip buffers
until the next keyframe.
until the next keyframe.
src/gstducatividdec.c | patch | blob | history | |
src/gstducatividdec.h | patch | blob | history |
diff --git a/src/gstducatividdec.c b/src/gstducatividdec.c
index b1622de462664c0c14ce32c2020a6ae7c1ddd669..5337a19777d7c5fe1915e068b77ba0231573cb77 100644 (file)
--- a/src/gstducatividdec.c
+++ b/src/gstducatividdec.c
self->dts_ridx = self->dts_widx = 0;
self->last_dts = self->last_pts = GST_CLOCK_TIME_NONE;
self->ts_may_be_pts = TRUE;
+ self->ts_is_pts = FALSE;
+ self->wait_keyframe = TRUE;
if (G_UNLIKELY (self->first_in_buffer)) {
return TRUE;
GstDucatiVidDecClass *klass = GST_DUCATIVIDDEC_GET_CLASS (self);
gint64 diff;
+ if (self->wait_keyframe) {
+ if (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT)) {
+ GST_INFO_OBJECT (self, "skipping until the next keyframe");
+ return FALSE;
+ }
+
+ self->wait_keyframe = FALSE;
+ }
+
timestamp = GST_BUFFER_TIMESTAMP (buf);
if (self->segment.format != GST_FORMAT_TIME ||
self->qos_earliest_time == GST_CLOCK_TIME_NONE)
self->qos_proportion = 1;
self->qos_earliest_time = GST_CLOCK_TIME_NONE;
+ self->wait_keyframe = TRUE;
self->need_out_buf = TRUE;
}
diff --git a/src/gstducatividdec.h b/src/gstducatividdec.h
index f9daabe8afcce9657fee77d8a34e4707986339c4..6811c2969dec28b763e4b25c47d92ec057d5637b 100644 (file)
--- a/src/gstducatividdec.h
+++ b/src/gstducatividdec.h
*/
gboolean ts_may_be_pts;
+ gboolean wait_keyframe;
+
#define NDTS 32
GstClockTime dts_queue[NDTS];
gint dts_ridx, dts_widx;