theoradec: segfault on 0-byte ogg_packet in _chain_reverse

This commit is contained in:
Philip Jägenstedt 2011-07-26 16:10:17 +02:00 committed by Sebastian Dröge
parent e161334988
commit 7d22d91fca

View file

@ -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);
}