summaryrefslogtreecommitdiffstats
path: root/ext/tarkin
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tarkin')
-rw-r--r--ext/tarkin/gsttarkin.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/tarkin/gsttarkin.c b/ext/tarkin/gsttarkin.c
index 69fee01a..6e9abbc1 100644
--- a/ext/tarkin/gsttarkin.c
+++ b/ext/tarkin/gsttarkin.c
@@ -69,11 +69,16 @@ static GstTypeDefinition tarkindefinition =
static GstCaps*
tarkin_type_find (GstBuffer *buf, gpointer private)
{
- guint32 head = GUINT32_FROM_BE (*((guint32 *)GST_BUFFER_DATA (buf)));
+ guint32 head;
+
+ if (GST_BUFFER_SIZE (buf) < 4)
+ return NULL;
/* FIXME */
return NULL;
+ head = GUINT32_FROM_BE (*((guint32 *)GST_BUFFER_DATA (buf)));
+
if (head != 0x4F676753)
return NULL;