mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-04 05:22:30 +00:00
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
This commit is contained in:
parent
93f27006cf
commit
b19d0bd840
1 changed files with 5 additions and 2 deletions
|
@ -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) ||
|
||||
|
|
Loading…
Reference in a new issue