summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2010-05-20 13:58:14 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2010-05-20 13:58:14 +0200
commitbf9d573cd1482da7b3f7539f730318425ed3a698 (patch)
tree6740ceab8392fa721f9dfbc12b2f219ccadc9b78
parent8fd69f2cb700b34af8b804e112ad24a857cb873c (diff)
oggdemux: Fix size checks
-rw-r--r--ext/ogg/gstoggdemux.c2
-rw-r--r--ext/ogg/gstoggstream.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c
index 348acffc9..a3f5e9c1a 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 0746b8374..38f9d92d9 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;