diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2013-05-07 10:16:48 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2013-05-07 10:23:17 +0200 |
commit | 1ee667a266ad8c00e302c8444d074ebcde1622ba (patch) | |
tree | b80f37b9af8ede9df1c778b8f69cdf96a809b999 | |
parent | a3bd8d3e8c4aff737497a2400d9868007008282b (diff) |
theoraenc: Don't call gst_buffer_fill() for empty Theora packets
gst_buffer_fill() does not like a NULL source data pointer.
-rw-r--r-- | ext/theora/gsttheoraenc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/theora/gsttheoraenc.c b/ext/theora/gsttheoraenc.c index 6c00626ce..52b544768 100644 --- a/ext/theora/gsttheoraenc.c +++ b/ext/theora/gsttheoraenc.c @@ -633,7 +633,8 @@ theora_push_packet (GstTheoraEnc * enc, ogg_packet * packet) goto done; } - gst_buffer_fill (frame->output_buffer, 0, packet->packet, packet->bytes); + if (packet->bytes > 0) + gst_buffer_fill (frame->output_buffer, 0, packet->packet, packet->bytes); /* the second most significant bit of the first data byte is cleared * for keyframes */ |