projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93f2700
)
don't segfault when data didn't make it in
author
Thomas Vander Stichele
<thomas@apestaart.org>
Sat, 18 Jan 2003 18:10:53 +0000
(18:10 +0000)
committer
Thomas Vander Stichele
<thomas@apestaart.org>
Sat, 18 Jan 2003 18:10:53 +0000
(18:10 +0000)
Original commit message from CVS:
don't segfault when data didn't make it in
gst/qtdemux/qtdemux.c
patch
|
blob
|
history
diff --git
a/gst/qtdemux/qtdemux.c
b/gst/qtdemux/qtdemux.c
index
f676989
..
06aae97
100644
(file)
--- 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) ||