mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:46:13 +00:00
aacparse: make sure we have enough ADTS data
We need at least 6 bytes to pass over to _get_frame_len() but we were just checking for a minimum of 2 bytes for the syncword. https://bugzilla.gnome.org/show_bug.cgi?id=724638
This commit is contained in:
parent
0566ea06e5
commit
c3a4bb1657
1 changed files with 8 additions and 0 deletions
|
@ -393,6 +393,14 @@ gst_aac_parse_check_adts_frame (GstAacParse * aacparse,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if ((data[0] == 0xff) && ((data[1] & 0xf6) == 0xf0)) {
|
if ((data[0] == 0xff) && ((data[1] & 0xf6) == 0xf0)) {
|
||||||
|
|
||||||
|
/* This looks like an ADTS frame header but
|
||||||
|
we need at least 6 bytes to proceed */
|
||||||
|
if (G_UNLIKELY (avail < 6)) {
|
||||||
|
*needed_data = 6;
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
*framesize = gst_aac_parse_adts_get_frame_len (data);
|
*framesize = gst_aac_parse_adts_get_frame_len (data);
|
||||||
|
|
||||||
/* In EOS mode this is enough. No need to examine the data further.
|
/* In EOS mode this is enough. No need to examine the data further.
|
||||||
|
|
Loading…
Reference in a new issue