mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
flacparse: avoid some more frame misparsing by additional header sanity check
... using a required constant blocking_strategy bit. https://bugzilla.gnome.org/show_bug.cgi?id=679807
This commit is contained in:
parent
f063e40af7
commit
a94d5d9f3b
1 changed files with 10 additions and 0 deletions
|
@ -549,6 +549,16 @@ gst_flac_parse_frame_header_is_valid (GstFlacParse * flacparse,
|
|||
}
|
||||
}
|
||||
|
||||
/* documentation says:
|
||||
* The "blocking strategy" bit must be the same throughout the entire stream. */
|
||||
if (flacparse->blocking_strategy != blocking_strategy) {
|
||||
if (flacparse->block_size != 0) {
|
||||
GST_WARNING_OBJECT (flacparse, "blocking strategy is not constant");
|
||||
if (suspect)
|
||||
*suspect = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
The FLAC format documentation says:
|
||||
The "blocking strategy" bit determines how to calculate the sample number
|
||||
|
|
Loading…
Reference in a new issue