From 1c3b6d42a910f6284e5126727357a32145df07cb Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Mon, 21 Nov 2005 23:51:45 +0000 Subject: [PATCH] gst-libs/gst/audio/audio.*: fix prototype - wondering why the test worked regardless Original commit message from CVS: * gst-libs/gst/audio/audio.c: (gst_audio_duration_from_pad_buffer): * gst-libs/gst/audio/audio.h: fix prototype - wondering why the test worked regardless --- ChangeLog | 6 ++++++ gst-libs/gst/audio/audio.c | 5 ++--- gst-libs/gst/audio/audio.h | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8252060..37381fd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-11-22 Thomas Vander Stichele + + * gst-libs/gst/audio/audio.c: (gst_audio_duration_from_pad_buffer): + * gst-libs/gst/audio/audio.h: + fix prototype - wondering why the test worked regardless + 2005-11-21 Thomas Vander Stichele * check/Makefile.am: diff --git a/gst-libs/gst/audio/audio.c b/gst-libs/gst/audio/audio.c index 1e145da..20e9f91 100644 --- a/gst-libs/gst/audio/audio.c +++ b/gst-libs/gst/audio/audio.c @@ -147,7 +147,7 @@ gst_audio_length (GstPad * pad, GstBuffer * buf) return length; } -double +GstClockTime gst_audio_duration_from_pad_buffer (GstPad * pad, GstBuffer * buf) { /* calculate length in nanoseconds @@ -184,9 +184,8 @@ gst_audio_duration_from_pad_buffer (GstPad * pad, GstBuffer * buf) g_assert (width != 0); g_assert (channels != 0); g_assert (rate != 0); - length = (bytes * 8.0 * GST_SECOND) / (rate * channels * width); + length = (bytes * 8 * GST_SECOND) / (rate * channels * width); } - /* g_print ("DEBUG: audio: returning length of %f\n", length); */ return length; } diff --git a/gst-libs/gst/audio/audio.h b/gst-libs/gst/audio/audio.h index 189de51..94035af 100644 --- a/gst-libs/gst/audio/audio.h +++ b/gst-libs/gst/audio/audio.h @@ -110,7 +110,7 @@ long gst_audio_frame_rate (GstPad *pad); /* calculate length in seconds of audio buffer buf based on caps of pad */ double gst_audio_length (GstPad* pad, GstBuffer* buf); -double gst_audio_duration_from_pad_buffer (GstPad * pad, GstBuffer * buf); +GstClockTime gst_audio_duration_from_pad_buffer (GstPad * pad, GstBuffer * buf); /* calculate highest possible sample value based on capabilities of pad */ long gst_audio_highest_sample_value (GstPad* pad); -- 2.7.4