summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Moutte <julien@moutte.net>2007-04-27 15:33:46 +0000
committerJulien Moutte <julien@moutte.net>2007-04-27 15:33:46 +0000
commite78e486da81362557bacdf1c125dbb2a121019d2 (patch)
tree66f38a97b29b89cd13dfd6fe46f36d83c703f793
parenta468f02d2aeabcf7e31d9e4cf576ab3474e8a1f7 (diff)
ext/theora/theoradec.c: Calculate buffer duration correctly to generate a perfect stream (#433888).RELEASE-0_10_15RELEASE-0_10_14RELEASE-0_10_13
Original commit message from CVS: 2007-04-27 Julien MOUTTE <julien@moutte.net> * ext/theora/theoradec.c: (_theora_granule_time), (theora_dec_push_forward), (theora_handle_data_packet), (theora_dec_decode_buffer): Calculate buffer duration correctly to generate a perfect stream (#433888). * gst/audioresample/gstaudioresample.c: (audioresample_check_discont): Glib provides ABS.
-rw-r--r--gst/audioresample/gstaudioresample.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gst/audioresample/gstaudioresample.c b/gst/audioresample/gstaudioresample.c
index fb5ebabd0..a475baf8b 100644
--- a/gst/audioresample/gstaudioresample.c
+++ b/gst/audioresample/gstaudioresample.c
@@ -575,8 +575,6 @@ audioresample_do_output (GstAudioresample * audioresample, GstBuffer * outbuf)
return GST_FLOW_OK;
}
-/* llabs() is C99, so we might not have it; just use a simple macro... */
-#define LLABS(x) ((x>0)?x:-x)
static gboolean
audioresample_check_discont (GstAudioresample * audioresample,
GstClockTime timestamp)
@@ -592,7 +590,7 @@ audioresample_check_discont (GstAudioresample * audioresample,
GstClockTimeDiff diff = timestamp -
(audioresample->prev_ts + audioresample->prev_duration);
- if (LLABS (diff) > GST_SECOND / audioresample->i_rate) {
+ if (ABS (diff) > GST_SECOND / audioresample->i_rate) {
GST_WARNING_OBJECT (audioresample,
"encountered timestamp discontinuity of %" G_GINT64_FORMAT, diff);
return TRUE;