mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
codec-utils: accept wrong version field in OpusHead header
Some Opus files found on the wild have 0 in the version field of the OpusHead header, instead of the correct value of 1. The files still play, don't make this error fatal. https://bugzilla.gnome.org/show_bug.cgi?id=758754
This commit is contained in:
parent
aae0dc37c9
commit
2a70c86e85
1 changed files with 5 additions and 2 deletions
|
@ -1519,7 +1519,7 @@ gst_codec_utils_opus_parse_header (GstBuffer * header,
|
|||
GstByteReader br;
|
||||
GstMapInfo map;
|
||||
gboolean ret = TRUE;
|
||||
guint8 c, f;
|
||||
guint8 c, f, version;
|
||||
|
||||
g_return_val_if_fail (GST_IS_BUFFER (header), FALSE);
|
||||
g_return_val_if_fail (gst_buffer_get_size (header) >= 19, FALSE);
|
||||
|
@ -1532,7 +1532,10 @@ gst_codec_utils_opus_parse_header (GstBuffer * header,
|
|||
ret = FALSE;
|
||||
goto done;
|
||||
}
|
||||
if (gst_byte_reader_get_uint8_unchecked (&br) != 0x01) {
|
||||
version = gst_byte_reader_get_uint8_unchecked (&br);
|
||||
if (version == 0x00)
|
||||
GST_ERROR ("Opus Header version is wrong, should be 0x01 and not 0x00");
|
||||
else if (version != 0x01) {
|
||||
ret = FALSE;
|
||||
goto done;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue