audioconvert: resize output buffer to correct size
authorWim Taymans <wtaymans@redhat.com>
Fri, 2 Jun 2017 07:41:59 +0000 (09:41 +0200)
committerWim Taymans <wtaymans@redhat.com>
Fri, 2 Jun 2017 07:44:19 +0000 (09:44 +0200)
If we are using a downstream bufferpool we need to set the size of the
buffer to our output size.

gst/audioconvert/gstaudioconvert.c

index 1bd0543..d86b2d4 100644 (file)
@@ -728,6 +728,8 @@ gst_audio_convert_transform (GstBaseTransform * base, GstBuffer * inbuf,
   if (insize == 0 || outsize == 0)
     return GST_FLOW_OK;
 
+  gst_buffer_resize (outbuf, 0, outsize);
+
   /* get src and dst data */
   if (inbuf != outbuf) {
     inbuf_writable = gst_buffer_is_writable (inbuf)