aacparse: ensure sufficient data available before accessing

This commit is contained in:
Mark Nauwelaerts 2009-11-26 17:04:36 +01:00
parent 64d6d5554e
commit d80b3e2f3b

View file

@ -342,6 +342,9 @@ gst_aacparse_check_adts_frame (GstAacParse * aacparse,
const guint8 * data,
const guint avail, guint * framesize, guint * needed_data)
{
if (G_UNLIKELY (avail < 2))
return FALSE;
if ((data[0] == 0xff) && ((data[1] & 0xf6) == 0xf0)) {
*framesize = gst_aacparse_adts_get_frame_len (data);