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:
Vincent Penquerc'h 2012-02-01 16:32:24 +00:00
parent 6f6f079dd9
commit 809546c324

View file

@ -401,8 +401,13 @@ vorbis_parse_parse_packet (GstVorbisParse * parse, GstBuffer * buf)
have_header = FALSE;
if (size >= 1) {
if (data[0] >= 0x01 && data[0] <= 0x05)
have_header = TRUE;
switch (data[0]) {
case 1:
case 3:
case 5:
have_header = TRUE;
break;
}
}
if (have_header) {