videoencoder: allow 0 sized output frames
authorWim Taymans <wim.taymans@collabora.co.uk>
Fri, 24 Aug 2012 14:56:00 +0000 (16:56 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Fri, 24 Aug 2012 14:56:00 +0000 (16:56 +0200)
Allow 0 sized frames in gst_video_encoder_allocate_output_frame(). Theora
encodes repeat frames, for example, as 0 sized buffers.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=681196

gst-libs/gst/video/gstvideoencoder.c

index 9c41a7e..e73705b 100644 (file)
@@ -1592,7 +1592,6 @@ gst_video_encoder_allocate_output_frame (GstVideoEncoder *
     encoder, GstVideoCodecFrame * frame, gsize size)
 {
   g_return_val_if_fail (frame->output_buffer == NULL, GST_FLOW_ERROR);
-  g_return_val_if_fail (size > 0, GST_FLOW_ERROR);
 
   GST_VIDEO_ENCODER_STREAM_LOCK (encoder);
   if (G_UNLIKELY (encoder->priv->output_state_changed