audio-converter: fix declaration-after-statement

This commit is contained in:
Mathieu Duponchelle 2018-02-15 21:08:08 +01:00
parent 9cf4293bde
commit 06ae49f525

View file

@ -1469,11 +1469,14 @@ gst_audio_converter_convert (GstAudioConverter * convert,
GstAudioConverterFlags flags, gpointer in, gsize in_size, GstAudioConverterFlags flags, gpointer in, gsize in_size,
gpointer * out, gsize * out_size) gpointer * out, gsize * out_size)
{ {
gsize in_frames;
gsize out_frames;
g_return_val_if_fail (convert != NULL, FALSE); g_return_val_if_fail (convert != NULL, FALSE);
g_return_val_if_fail (flags ^ GST_AUDIO_CONVERTER_FLAG_IN_WRITABLE, FALSE); g_return_val_if_fail (flags ^ GST_AUDIO_CONVERTER_FLAG_IN_WRITABLE, FALSE);
gsize in_frames = in_size / convert->in.bpf; in_frames = in_size / convert->in.bpf;
gsize out_frames = gst_audio_converter_get_out_frames (convert, in_frames); out_frames = gst_audio_converter_get_out_frames (convert, in_frames);
*out_size = out_frames * convert->out.bpf; *out_size = out_frames * convert->out.bpf;
*out = g_malloc0 (*out_size); *out = g_malloc0 (*out_size);