media/liboggz/bug516847.patch
author Timothy Nikkel <tnikkel@gmail.com>
Thu, 18 Feb 2010 13:23:23 -0600
changeset 38273 5b74da35092c9cd5d8c942adc89c47fa9dc86d45
parent 32931 30dc0db2b1364a1d8b47d14e41495a975276192b
permissions -rw-r--r--
Bug 545593. Remove nsViewManager::Enable/DisableRefresh. r=roc

diff --git a/media/liboggz/src/liboggz/oggz_auto.c b/media/liboggz/src/liboggz/oggz_auto.c
--- a/media/liboggz/src/liboggz/oggz_auto.c
+++ b/media/liboggz/src/liboggz/oggz_auto.c
@@ -559,17 +559,17 @@ typedef struct {
 static ogg_int64_t
 auto_calc_theora(ogg_int64_t now, oggz_stream_t *stream, ogg_packet *op) {
 
   long keyframe_no;
   int keyframe_shift;
   unsigned char first_byte;
   auto_calc_theora_info_t *info;
 
-  first_byte = op->packet[0];
+  first_byte = op->bytes == 0 ? 0x40 : op->packet[0];
 
   info = (auto_calc_theora_info_t *)stream->calculate_data;
 
   /* header packet */
   if (first_byte & 0x80)
   {
     if (info == NULL) {
       stream->calculate_data = oggz_malloc(sizeof(auto_calc_theora_info_t));