mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
flacdec: warn if we see a variable block size where unsupported
https://bugzilla.gnome.org/show_bug.cgi?id=650960
This commit is contained in:
parent
f8a9f5bc1c
commit
1549aaba27
1 changed files with 5 additions and 1 deletions
|
@ -408,8 +408,12 @@ gst_flac_dec_scan_got_frame (GstFlacDec * flacdec, guint8 * data, guint size,
|
|||
return FALSE;
|
||||
|
||||
/* sync */
|
||||
if (data[0] != 0xFF || data[1] != 0xF8)
|
||||
if (data[0] != 0xFF || (data[1] & 0xFC) != 0xF8)
|
||||
return FALSE;
|
||||
if (data[1] & 1) {
|
||||
GST_WARNING_OBJECT (flacdec, "Variable block size FLAC unsupported");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bs = (data[2] & 0xF0) >> 8; /* blocksize marker */
|
||||
sr = (data[2] & 0x0F); /* samplerate marker */
|
||||
|
|
Loading…
Reference in a new issue