mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-12 11:26:39 +00:00
typefind: Fix handling of ID_ODD_SIZE in WavPack typefinder
Chunks are always starting on an even position and this flag only specifies that the last byte of the chunk is not valid. Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3569 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7262>
This commit is contained in:
parent
0b79124bdd
commit
a0a54303cb
1 changed files with 2 additions and 6 deletions
|
@ -2094,12 +2094,8 @@ wavpack_type_find (GstTypeFind * tf, gpointer unused)
|
|||
sublen += 1 + 1; /* id + length */
|
||||
}
|
||||
|
||||
// ID_ODD_SIZE
|
||||
if (data[0] & 0x40) {
|
||||
if (sublen == 0)
|
||||
return;
|
||||
sublen -= 1;
|
||||
}
|
||||
// ID_ODD_SIZE only affects how much of the chunk is valid. The next one
|
||||
// still starts at an even position, so it's ignored here.
|
||||
|
||||
if (offset + sublen > 8 + blocksize) {
|
||||
GST_LOG ("chunk length too big (%u > %" G_GUINT64_FORMAT ")", sublen,
|
||||
|
|
Loading…
Reference in a new issue