diff --git a/ext/opus/gstopusheader.c b/ext/opus/gstopusheader.c index 36cb4ec936..5c4edba49f 100644 --- a/ext/opus/gstopusheader.c +++ b/ext/opus/gstopusheader.c @@ -231,7 +231,7 @@ gst_opus_header_is_id_header (GstBuffer * buf) { gsize size = gst_buffer_get_size (buf); guint8 *data = NULL; - guint8 channels, channel_mapping_family, n_streams, n_stereo_streams; + guint8 version, channels, channel_mapping_family, n_streams, n_stereo_streams; gboolean ret = FALSE; GstMapInfo map; @@ -244,6 +244,10 @@ gst_opus_header_is_id_header (GstBuffer * buf) data = map.data; size = map.size; + version = data[8]; + if (version >= 0x0f) /* major version >=0 is what we grok */ + goto beach; + channels = data[9]; if (channels == 0)