gst/audioconvert/gstaudioconvert.c: Don't fail on 0 sized buffers. Fixes #396835.

Original commit message from CVS:
* gst/audioconvert/gstaudioconvert.c:
Don't fail on 0 sized buffers. Fixes #396835.
This commit is contained in:
Wim Taymans 2007-01-30 11:29:17 +00:00
parent 888ea4730e
commit 75d5fcb62e
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2007-01-30 Wim Taymans <wim@fluendo.com>
* gst/audioconvert/gstaudioconvert.c:
Don't fail on 0 sized buffers. Fixes #396835.
2007-01-29 David Schleef <ds@schleef.org>
* gst/typefind/gsttypefindfunctions.c:

View file

@ -411,8 +411,8 @@ set_structure_widths (GstStructure * s, int min, int max)
* channels, as the latter conversion is not lossless.
*
* So, we return, in order (assuming input caps have only one structure;
* is this right?):
* - input caps with a different format (lossless conversions).
* which is enforced by basetransform):
* - input caps with a different format (lossless conversions).
* - input caps with a different format (slightly lossy conversions).
* - input caps with a different number of channels (very lossy!)
*/
@ -654,6 +654,9 @@ gst_audio_convert_transform (GstBaseTransform * base, GstBuffer * inbuf,
if (!(res = audio_convert_get_sizes (&this->ctx, samples, &insize, &outsize)))
goto error;
if (insize == 0 || outsize == 0)
return GST_FLOW_OK;
/* check in and outsize */
if (GST_BUFFER_SIZE (inbuf) < insize)
goto wrong_size;