mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +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/6944>
This commit is contained in:
parent
b77de8f6f2
commit
3d9fd9926c
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 */
|
sublen += 1 + 1; /* id + length */
|
||||||
}
|
}
|
||||||
|
|
||||||
// ID_ODD_SIZE
|
// ID_ODD_SIZE only affects how much of the chunk is valid. The next one
|
||||||
if (data[0] & 0x40) {
|
// still starts at an even position, so it's ignored here.
|
||||||
if (sublen == 0)
|
|
||||||
return;
|
|
||||||
sublen -= 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (offset + sublen > 8 + blocksize) {
|
if (offset + sublen > 8 + blocksize) {
|
||||||
GST_LOG ("chunk length too big (%u > %" G_GUINT64_FORMAT ")", sublen,
|
GST_LOG ("chunk length too big (%u > %" G_GUINT64_FORMAT ")", sublen,
|
||||||
|
|
Loading…
Reference in a new issue