mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
amrparse: a valid amr-wb frame should not have reserved frame type index
See #639715.
This commit is contained in:
parent
d1bea6361b
commit
cc1b5ded6d
1 changed files with 4 additions and 3 deletions
|
@ -64,7 +64,7 @@ static const gint block_size_nb[16] =
|
|||
{ 12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
static const gint block_size_wb[16] =
|
||||
{ 17, 23, 32, 36, 40, 46, 50, 58, 60, 5, 5, 0, 0, 0, 0, 0 };
|
||||
{ 17, 23, 32, 36, 40, 46, 50, 58, 60, 5, -1, -1, -1, -1, 0, 0 };
|
||||
|
||||
/* AMR has a "hardcoded" framerate of 50fps */
|
||||
#define AMR_FRAMES_PER_SECOND 50
|
||||
|
@ -307,8 +307,9 @@ gst_amrparse_check_valid_frame (GstBaseParse * parse,
|
|||
* to contain a valid header as well (and there is enough data to
|
||||
* perform this check)
|
||||
*/
|
||||
if (GST_BASE_PARSE_FRAME_SYNC (frame) || GST_BASE_PARSE_FRAME_DRAIN (frame)
|
||||
|| (dsize > fsize && (data[fsize] & 0x83) == 0)) {
|
||||
if (fsize &&
|
||||
(GST_BASE_PARSE_FRAME_SYNC (frame) || GST_BASE_PARSE_FRAME_DRAIN (frame)
|
||||
|| (dsize > fsize && (data[fsize] & 0x83) == 0))) {
|
||||
*framesize = fsize;
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue