theoraenc: Don't call gst_buffer_fill() for empty Theora packets

gst_buffer_fill() does not like a NULL source data pointer.
This commit is contained in:
Sebastian Dröge 2013-05-07 10:16:48 +02:00
parent f3b6548f09
commit ef6a2a6c14

View file

@ -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 */