From bf9d573cd1482da7b3f7539f730318425ed3a698 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 20 May 2010 13:58:14 +0200 Subject: [PATCH] oggdemux: Fix size checks --- ext/ogg/gstoggdemux.c | 2 +- ext/ogg/gstoggstream.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index 348acff..a3f5e9c 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -490,7 +490,7 @@ gst_ogg_demux_chain_peer (GstOggPad * pad, ogg_packet * packet, /* We don't push header packets for VP8 */ cret = gst_ogg_demux_combine_flows (ogg, pad, GST_FLOW_OK); goto done; - } else if (packet->b_o_s || (packet->bytes >= 5 + } else if (packet->b_o_s || (packet->bytes >= 6 && memcmp (packet->packet, "OVP80", 6) == 0)) { /* We don't push header packets for VP8 */ cret = gst_ogg_demux_combine_flows (ogg, pad, GST_FLOW_OK); diff --git a/ext/ogg/gstoggstream.c b/ext/ogg/gstoggstream.c index 0746b83..38f9d92 100644 --- a/ext/ogg/gstoggstream.c +++ b/ext/ogg/gstoggstream.c @@ -595,7 +595,7 @@ granulepos_to_key_granule_vp8 (GstOggStream * pad, gint64 granulepos) static gboolean is_header_vp8 (GstOggStream * pad, ogg_packet * packet) { - if (packet->bytes > 6 && packet->packet[0] == 0x4F && + if (packet->bytes >= 5 && packet->packet[0] == 0x4F && packet->packet[1] == 0x56 && packet->packet[2] == 0x50 && packet->packet[3] == 0x38 && packet->packet[4] == 0x30) return TRUE; -- 2.7.4