summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 479b056)
raw | patch | inline | side by side (parent: 479b056)
author | Alessandro Decina <alessandro.decina@collabora.co.uk> | |
Thu, 16 Feb 2012 17:13:13 +0000 (18:13 +0100) | ||
committer | Alessandro Decina <alessandro.decina@collabora.co.uk> | |
Thu, 16 Feb 2012 17:13:13 +0000 (18:13 +0100) |
Handle IH264VDEC_ERR_NOSLICE errors by flushing and skipping to the next
keyframe.
keyframe.
src/gstducatih264dec.c | patch | blob | history |
diff --git a/src/gstducatih264dec.c b/src/gstducatih264dec.c
index a744900eb5517f3f55584eb7e072de7e3cc1ec36..36d9814cd21c336088a62b34812294e4dbc8d3b8 100644 (file)
--- a/src/gstducatih264dec.c
+++ b/src/gstducatih264dec.c
return ret;
}
+static gint
+gst_ducati_h264dec_handle_error (GstDucatiVidDec * self, gint ret,
+ gint extended_error, gint status_extended_error)
+{
+ if (extended_error & 0x00000001)
+ /* No valid slice. This seems to be bad enough that it's better to flush and
+ * skip to the next keyframe.
+ */
+ gst_ducati_viddec_codec_flush (self, FALSE);
+
+ ret = parent_class->handle_error (self, ret, extended_error,
+ status_extended_error);
+
+ return ret;
+}
+
static gboolean
gst_ducati_h264dec_drop_frame (GstDucatiVidDec * self, GstBuffer * buf,
gint64 diff)
GST_DEBUG_FUNCPTR (gst_ducati_h264dec_update_buffer_size);
bclass->allocate_params =
GST_DEBUG_FUNCPTR (gst_ducati_h264dec_allocate_params);
+ bclass->handle_error = GST_DEBUG_FUNCPTR (gst_ducati_h264dec_handle_error);
bclass->drop_frame = GST_DEBUG_FUNCPTR (gst_ducati_h264dec_drop_frame);
}