diff options
Diffstat (limited to 'ext/theora/gsttheoraenc.c')
-rw-r--r-- | ext/theora/gsttheoraenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/theora/gsttheoraenc.c b/ext/theora/gsttheoraenc.c index 959456290..0c231a43c 100644 --- a/ext/theora/gsttheoraenc.c +++ b/ext/theora/gsttheoraenc.c @@ -610,7 +610,7 @@ theora_buffer_from_packet (GstTheoraEnc * enc, ogg_packet * packet, /* the second most significant bit of the first data byte is cleared * for keyframes */ - if ((packet->packet[0] & 0x40) == 0) { + if (packet->bytes > 0 && (packet->packet[0] & 0x40) == 0) { GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_DELTA_UNIT); } else { GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT); |