summaryrefslogtreecommitdiffstats
path: root/gst-libs/gst
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2002-07-12 21:09:17 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2002-07-12 21:09:17 +0000
commitee0eb50292de5727aad65060a420e0c6d58f6233 (patch)
tree0d57a1c7507bc1c6e4cdb7ee4bd2105cd6beb3db /gst-libs/gst
parent12e65bd17e9d11bac1cc0200210ed2d47cb12161 (diff)
downloadgst-plugins-bad-ee0eb50292de5727aad65060a420e0c6d58f6233.tar.gz
gst-plugins-bad-ee0eb50292de5727aad65060a420e0c6d58f6233.tar.bz2
gst-plugins-bad-ee0eb50292de5727aad65060a420e0c6d58f6233.zip
small fixes
Original commit message from CVS: small fixes
Diffstat (limited to 'gst-libs/gst')
-rw-r--r--gst-libs/gst/audio/audio.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gst-libs/gst/audio/audio.c b/gst-libs/gst/audio/audio.c
index c08732ac..56beb6dd 100644
--- a/gst-libs/gst/audio/audio.c
+++ b/gst-libs/gst/audio/audio.c
@@ -104,11 +104,13 @@ gst_audio_length (GstPad* pad, GstBuffer* buf)
GstCaps *caps = NULL;
+ g_assert (GST_IS_BUFFER (buf));
/* get caps of pad */
caps = GST_PAD_CAPS (pad);
if (caps == NULL)
{
/* ERROR: could not get caps of pad */
+ g_error ("gstaudio: warning: could not get caps of pad %p\n", pad);
length = 0.0;
}
else
@@ -118,8 +120,13 @@ gst_audio_length (GstPad* pad, GstBuffer* buf)
gst_caps_get_int (caps, "channels", &channels);
gst_caps_get_int (caps, "rate", &rate);
+ g_assert (bytes != 0);
+ g_assert (width != 0);
+ g_assert (channels != 0);
+ g_assert (rate != 0);
length = (bytes * 8.0) / (double) (rate * channels * width);
}
+ /* g_print ("DEBUG: audio: returning length of %f\n", length); */
return length;
}