summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/mimic/gstmimdec.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/mimic/gstmimdec.c b/ext/mimic/gstmimdec.c
index 9e97a300..cd679a5a 100644
--- a/ext/mimic/gstmimdec.c
+++ b/ext/mimic/gstmimdec.c
@@ -212,6 +212,14 @@ gst_mimdec_chain (GstPad *pad, GstBuffer *in)
GstEvent * event;
gboolean result;
+ /* Check if its a keyframe, otherwise skip it */
+ if (GUINT32_FROM_LE(*((guint32 *) (frame_body + 12))) != 0) {
+ gst_adapter_flush (mimdec->adapter, mimdec->payload_size);
+ mimdec->have_header = FALSE;
+ res = GST_FLOW_OK;
+ goto out;
+ }
+
mimdec->dec = mimic_open ();
if (mimdec->dec == NULL) {
GST_WARNING_OBJECT (mimdec, "mimic_open error\n");