From ef6a2a6c14d6cdad0dc0fabf2b32c68a4c2f2ed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 7 May 2013 10:16:48 +0200 Subject: [PATCH] theoraenc: Don't call gst_buffer_fill() for empty Theora packets gst_buffer_fill() does not like a NULL source data pointer. --- ext/theora/gsttheoraenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/theora/gsttheoraenc.c b/ext/theora/gsttheoraenc.c index fcae87fa30..37ca24b33d 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 */