summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d17883f)
raw | patch | inline | side by side (parent: d17883f)
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | |
Tue, 17 Jul 2012 11:11:28 +0000 (11:11 +0000) | ||
committer | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | |
Tue, 17 Jul 2012 11:11:28 +0000 (11:11 +0000) |
This reverts commit 5fa560d82caf91230fbc04b3768952727e1bd022.
It turns out that drop_frame does not in fact drop those frames that are
necessary for decoding future frames.
It turns out that drop_frame does not in fact drop those frames that are
necessary for decoding future frames.
src/gstducatividdec.c | patch | blob | history |
diff --git a/src/gstducatividdec.c b/src/gstducatividdec.c
index 04d23c8e74b2ba404b70e8b9a6e7f39c2230028a..afb36749a5c47048a6f095e1c685cd4c4beb2f01 100644 (file)
--- a/src/gstducatividdec.c
+++ b/src/gstducatividdec.c
#include "gstducatividdec.h"
#include "gstducatibufferpriv.h"
-static gboolean gst_ducati_viddec_do_qos (GstDucatiVidDec * self, GstBuffer * buf);
-
GST_BOILERPLATE (GstDucatiVidDec, gst_ducati_viddec, GstElement,
GST_TYPE_ELEMENT);
gint i;
GstDucatiVidDecClass *klass = GST_DUCATIVIDDEC_GET_CLASS (self);
GstFlowReturn ret = GST_FLOW_OK;
- gboolean decode;
-
if (flow_ret)
/* never leave flow_ret uninitialized */
*flow_ret = GST_FLOW_OK;
gst_buffer_set_caps (outbuf, GST_PAD_CAPS (self->srcpad));
}
- decode = gst_ducati_viddec_do_qos (self, outbuf);
- if (!decode) {
- GST_DEBUG_OBJECT (self, "Output buffer too late, dropping");
- gst_buffer_unref (outbuf);
- continue;
- }
-
if (self->crop)
gst_buffer_set_video_crop (outbuf, self->crop);
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)
Int32 err;
GstBuffer *outbuf = NULL;
GstCaps *outcaps = NULL;
+ gboolean decode;
if (G_UNLIKELY (!self->engine)) {
GST_ERROR_OBJECT (self, "no engine");
GST_DEBUG_OBJECT (self, "chain: %" GST_TIME_FORMAT " (%d bytes, flags %d)",
GST_TIME_ARGS (ts), GST_BUFFER_SIZE (buf), GST_BUFFER_FLAGS (buf));
- 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");
- gst_buffer_unref (buf);
- return GST_FLOW_OK;
- }
-
- self->wait_keyframe = FALSE;
+ decode = gst_ducati_viddec_do_qos (self, buf);
+ if (!decode) {
+ gst_buffer_unref (buf);
+ return GST_FLOW_OK;
}
if (!self->need_out_buf)