diff options
author | Thomas Vander Stichele <thomas@apestaart.org> | 2003-01-18 18:10:53 +0000 |
---|---|---|
committer | Thomas Vander Stichele <thomas@apestaart.org> | 2003-01-18 18:10:53 +0000 |
commit | b19d0bd840c89289b2103d29f22cb27b51e72ab3 (patch) | |
tree | 9e5f4844c9582fda22c61ca1f6cd86cbeed6d8c8 /gst/qtdemux | |
parent | 93f27006cfa693626e10fa4aacb036f1ade85a77 (diff) |
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
Diffstat (limited to 'gst/qtdemux')
-rw-r--r-- | gst/qtdemux/qtdemux.c | 7 |
1 files changed, 5 insertions, 2 deletions
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) || |