gecko-dev/media/liboggz/bug516847.patch

23 строки
733 B
Diff

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