[0.11] gst-plugins-base: audio: Fix size check

Edward Hervey bilboed at kemper.freedesktop.org
Fri Jan 6 06:39:45 PST 2012


Module: gst-plugins-base
Branch: 0.11
Commit: 82da418201d9a76fb31d910421da35967892839b
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=82da418201d9a76fb31d910421da35967892839b

Author: Edward Hervey <edward.hervey at collabora.co.uk>
Date:   Fri Jan  6 15:14:59 2012 +0100

audio: Fix size check

We fail (and return) if the size is *NOT* a multiple of samples.

---

 gst-libs/gst/audio/audio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gst-libs/gst/audio/audio.c b/gst-libs/gst/audio/audio.c
index c51d9c9..bb287b5 100644
--- a/gst-libs/gst/audio/audio.c
+++ b/gst-libs/gst/audio/audio.c
@@ -999,7 +999,7 @@ gst_audio_reorder_channels (gpointer data, gsize size, GstAudioFormat format,
   g_return_val_if_fail (info != NULL && info->width > 0, FALSE);
   g_return_val_if_fail (info->width > 0, FALSE);
   g_return_val_if_fail (info->width <= 8 * 64, FALSE);
-  g_return_val_if_fail (size % ((info->width * channels) / 8) != 0, FALSE);
+  g_return_val_if_fail (size % ((info->width * channels) / 8) == 0, FALSE);
   g_return_val_if_fail (channels > 0, FALSE);
   g_return_val_if_fail (channels <= 64, FALSE);
 



More information about the gstreamer-commits mailing list