mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-25 15:36:42 +00:00
vorbisparse: fix header detection
It was matching non header packets. This fixes various leaks, where buffers would be pushed onto a headers list, but never popped. Might also fix corruption as those buffers were dropped from the output silently... https://bugzilla.gnome.org/show_bug.cgi?id=669167
This commit is contained in:
parent
6f6f079dd9
commit
809546c324
1 changed files with 7 additions and 2 deletions
|
@ -401,8 +401,13 @@ vorbis_parse_parse_packet (GstVorbisParse * parse, GstBuffer * buf)
|
||||||
|
|
||||||
have_header = FALSE;
|
have_header = FALSE;
|
||||||
if (size >= 1) {
|
if (size >= 1) {
|
||||||
if (data[0] >= 0x01 && data[0] <= 0x05)
|
switch (data[0]) {
|
||||||
|
case 1:
|
||||||
|
case 3:
|
||||||
|
case 5:
|
||||||
have_header = TRUE;
|
have_header = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (have_header) {
|
if (have_header) {
|
||||||
|
|
Loading…
Reference in a new issue