summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2b49e26)
raw | patch | inline | side by side (parent: 2b49e26)
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | |
Tue, 17 Jul 2012 09:58:07 +0000 (09:58 +0000) | ||
committer | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | |
Tue, 17 Jul 2012 10:17:32 +0000 (10:17 +0000) |
This avoids resetting various state in the middle of processing,
which could lead to buffer leaks, and generally more confusing flow.
which could lead to buffer leaks, and generally more confusing flow.
src/gstducatih264dec.c | patch | blob | history | |
src/gstducatividdec.c | patch | blob | history | |
src/gstducatividdec.h | patch | blob | history |
diff --git a/src/gstducatih264dec.c b/src/gstducatih264dec.c
index fa8a8c1da13ecba1c861da3adf01103a4ca4a88b..47456150e086669e681c08c4a73ec1d4270986ca 100644 (file)
--- a/src/gstducatih264dec.c
+++ b/src/gstducatih264dec.c
self->inArgs->inputID = 0;
}
- gst_ducati_viddec_codec_flush (self, FALSE);
+ self->needs_flushing = TRUE;
}
ret = parent_class->handle_error (self, ret, extended_error,
diff --git a/src/gstducatividdec.c b/src/gstducatividdec.c
index ebb852d5efdb3ba355e4e51cf3512e400975be32..3239647942d101588e6a1bf037f80bf15806bf2c 100644 (file)
--- a/src/gstducatividdec.c
+++ b/src/gstducatividdec.c
self->ts_may_be_pts = TRUE;
self->ts_is_pts = FALSE;
self->wait_keyframe = TRUE;
+ self->needs_flushing = FALSE;
if (G_UNLIKELY (self->first_in_buffer)) {
goto out;
goto allocate_buffer;
}
+ if (self->needs_flushing)
+ gst_ducati_viddec_codec_flush (self, FALSE);
+
return GST_FLOW_OK;
}
diff --git a/src/gstducatividdec.h b/src/gstducatividdec.h
index a7cae6a081592e709ed4e35754d103e1f889f6ed..0b5e2a536541ce8c1a1c996e55b24c1b8a6e1c25 100644 (file)
--- a/src/gstducatividdec.h
+++ b/src/gstducatividdec.h
gboolean wait_keyframe;
+ gboolean needs_flushing;
+
#define NDTS 32
GstClockTime dts_queue[NDTS];
gint dts_ridx, dts_widx;