summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2003-01-18 18:10:53 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2003-01-18 18:10:53 +0000
commit034094d7a40551ed1256659cb205ef6d43a56dc0 (patch)
treeb44823410366aa9d232d9145e9a76bc5c3cdf953
parentadcae26e69820706af45da22eed4fb2e8d2bb351 (diff)
downloadgst-plugins-bad-034094d7a40551ed1256659cb205ef6d43a56dc0.tar.gz
gst-plugins-bad-034094d7a40551ed1256659cb205ef6d43a56dc0.tar.bz2
gst-plugins-bad-034094d7a40551ed1256659cb205ef6d43a56dc0.zip
don't segfault when data didn't make it in
Original commit message from CVS: don't segfault when data didn't make it in
m---------common0
-rw-r--r--gst/qtdemux/qtdemux.c7
2 files changed, 5 insertions, 2 deletions
diff --git a/common b/common
-Subproject 5b6a58f419c3d6fdd4abbe9943cd17a4fd2addc
+Subproject 895baa0fa0f829ef752424a31bbb2cf68e63842
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c
index f6769893..06aae979 100644
--- a/gst/qtdemux/qtdemux.c
+++ b/gst/qtdemux/qtdemux.c
@@ -211,11 +211,14 @@ gst_qtdemux_init (GstQTDemux *qtdemux)
}
static GstCaps*
-quicktime_type_find (GstBuffer *buf,
- gpointer private)
+quicktime_type_find (GstBuffer *buf, gpointer private)
{
gchar *data = GST_BUFFER_DATA (buf);
+ /* we could get a NULL buffer, for example when the input could not be
+ * mmap'd */
+ g_return_val_if_fail (data != NULL, NULL);
+
/* exactly like in the old version */
if (!strncmp (&data[4], "wide", 4) ||
!strncmp (&data[4], "moov", 4) ||