mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 14:36:24 +00:00
gst/typefind/gsttypefindfunctions.c: Don't segfault on NULL data.
Original commit message from CVS: * gst/typefind/gsttypefindfunctions.c: (aac_type_find): Don't segfault on NULL data.
This commit is contained in:
parent
ac515f710f
commit
4778549c39
2 changed files with 15 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-11-08 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/typefind/gsttypefindfunctions.c: (aac_type_find):
|
||||
Don't segfault on NULL data.
|
||||
|
||||
2004-11-08 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/playback/gstdecodebin.c: (unlinked):
|
||||
|
|
|
@ -222,6 +222,7 @@ aac_type_find (GstTypeFind * tf, gpointer unused)
|
|||
* note that this is a pretty lame typefind method (14 bits, 0.006%), so
|
||||
* we'll only use LIKELY
|
||||
*/
|
||||
if (data) {
|
||||
if (data[0] == 0xFF && (data[1] & 0xF6) == 0xF0) {
|
||||
gboolean mpegversion = (data[1] & 0x08) ? 2 : 4;
|
||||
GstCaps *caps = gst_caps_new_simple ("audio/mpeg",
|
||||
|
@ -232,6 +233,7 @@ aac_type_find (GstTypeFind * tf, gpointer unused)
|
|||
gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, caps);
|
||||
gst_caps_free (caps);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*** audio/mpeg version 1 ****************************************************/
|
||||
|
|
Loading…
Reference in a new issue