summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2010-03-29 20:07:52 -0700
committerDavid Schleef <ds@schleef.org>2010-03-29 20:54:46 -0700
commit681721466df968649906002c10df8fcfedaaae99 (patch)
tree20c1a7fd79c698464325dfd60c081cecaa41a9a5
parent93e408bdbb1e470f1f2993ecf2a795c5b09bfe53 (diff)
theoraenc: 0-length packets are delta units
-rw-r--r--ext/theora/gsttheoraenc.c2
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);