mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
flacparse: warn on wishful parsing of weird headers
If we get anything from 7 to 126 as type when parsing a metadata block header, we are likely dealing with a FLAC stream version we don't fully understand. Issue a warning if so. Document function assumptions regarding the passed-on type while at this.
This commit is contained in:
parent
df6f0bc595
commit
8a745837aa
1 changed files with 5 additions and 1 deletions
|
@ -1490,6 +1490,8 @@ gst_flac_parse_reset_buffer_time_and_offset (GstBuffer * buffer)
|
|||
GST_BUFFER_OFFSET_END (buffer) = 0;
|
||||
}
|
||||
|
||||
/* Type 127 is invalid for a metadata block header & should
|
||||
* be discarded _before_ calling this function */
|
||||
static gboolean
|
||||
gst_flac_parse_handle_block_type (GstFlacParse * flacparse, guint type,
|
||||
GstBuffer * sbuffer)
|
||||
|
@ -1524,7 +1526,9 @@ gst_flac_parse_handle_block_type (GstFlacParse * flacparse, guint type,
|
|||
GST_INFO_OBJECT (flacparse, "APPLICATION header");
|
||||
break;
|
||||
default: /* RESERVED */
|
||||
GST_INFO_OBJECT (flacparse, "unhandled header of type %u", type);
|
||||
GST_INFO_OBJECT (flacparse, "Unhandled metadata header type '%u'", type);
|
||||
GST_WARNING_OBJECT (flacparse,
|
||||
"FLAC version might not be fully supported");
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue