summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Smith <msmith@xiph.org>2007-05-21 15:24:21 +0000
committerMichael Smith <msmith@xiph.org>2007-05-21 15:24:21 +0000
commitb48b9fdc198b30bdad2197b19a22e120a9beccdd (patch)
tree304a1846f3e3fe7710f74eadd28e2c976ec26935
parent9b188adc27308a26b8a0b517184afd6eeece2d88 (diff)
ext/theora/theoradec.c: Don't look inside 0-length packets (which indicate duplicated frames)
Original commit message from CVS: * ext/theora/theoradec.c: (theora_handle_data_packet): Don't look inside 0-length packets (which indicate duplicated frames)
-rw-r--r--ChangeLog6
-rw-r--r--ext/theora/theoradec.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a71d22bf..6afc74ae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-05-21 Michael Smith <msmith@fluendo.com>
+
+ * ext/theora/theoradec.c: (theora_handle_data_packet):
+ Don't look inside 0-length packets (which indicate duplicated
+ frames)
+
2007-05-21 Wim Taymans <wim@fluendo.com>
* ext/cdparanoia/gstcdparanoiasrc.c:
diff --git a/ext/theora/theoradec.c b/ext/theora/theoradec.c
index 1e346a5f..84b2f576 100644
--- a/ext/theora/theoradec.c
+++ b/ext/theora/theoradec.c
@@ -1029,8 +1029,8 @@ theora_handle_data_packet (GstTheoraDec * dec, ogg_packet * packet,
goto not_initialized;
/* the second most significant bit of the first data byte is cleared
- * for keyframes */
- keyframe = (packet->packet[0] & 0x40) == 0;
+ * for keyframes. We can only check it if it's not a zero-length packet. */
+ keyframe = packet->bytes && ((packet->packet[0] & 0x40) == 0);
if (G_UNLIKELY (keyframe)) {
GST_DEBUG_OBJECT (dec, "we have a keyframe");
dec->need_keyframe = FALSE;