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:
Mark Nauwelaerts 2012-07-13 14:43:31 +02:00
parent f063e40af7
commit a94d5d9f3b

View file

@ -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