From 7d22d91fca6b9f24ca205eef98031f1ed6a44d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Tue, 26 Jul 2011 16:10:17 +0200 Subject: [PATCH] theoradec: segfault on 0-byte ogg_packet in _chain_reverse --- ext/theora/gsttheoradec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/theora/gsttheoradec.c b/ext/theora/gsttheoradec.c index 96e12eecb5..25d68dbac5 100644 --- a/ext/theora/gsttheoradec.c +++ b/ext/theora/gsttheoradec.c @@ -1440,7 +1440,7 @@ theora_dec_chain_reverse (GstTheoraDec * dec, gboolean discont, GstBuffer * buf) /* if we copied a keyframe, flush and decode the decode queue */ data = GST_BUFFER_DATA (gbuf); - if ((data[0] & 0x40) == 0) { + if (data && (data[0] & 0x40) == 0) { GST_DEBUG_OBJECT (dec, "copied keyframe"); res = theora_dec_flush_decode (dec); }