From 4abf31067f1ef5d2f632dca210353c86bc9af3a1 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Mon, 1 Feb 2010 22:37:30 +0100 Subject: [PATCH] speexdec: adapt to new oggdemux Remove all granulepos hacks and simply use upstream timestamps. --- ext/speex/gstspeexdec.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/ext/speex/gstspeexdec.c b/ext/speex/gstspeexdec.c index 071ccf5783..c59e1c7be7 100644 --- a/ext/speex/gstspeexdec.c +++ b/ext/speex/gstspeexdec.c @@ -761,25 +761,8 @@ speex_dec_chain (GstPad * pad, GstBuffer * buf) break; default: { - GstClockTime timestamp; - - /* FIXME minor old oggdemux compatibility, remove ... */ - if (!GST_BUFFER_TIMESTAMP_IS_VALID (buf) - && GST_BUFFER_OFFSET_END_IS_VALID (buf)) { - gint64 granulepos = GST_BUFFER_OFFSET_END (buf); - - GST_DEBUG_OBJECT (dec, - "Taking granulepos from upstream: %" G_GUINT64_FORMAT, granulepos); - granulepos -= dec->frame_size * dec->header->frames_per_packet; - if (granulepos < 0) - granulepos = 0; - timestamp = gst_util_uint64_scale_int (granulepos, - GST_SECOND, dec->header->rate); - } else { - timestamp = GST_BUFFER_TIMESTAMP (buf); - } res = - speex_dec_chain_parse_data (dec, buf, timestamp, + speex_dec_chain_parse_data (dec, buf, GST_BUFFER_TIMESTAMP (buf), GST_BUFFER_DURATION (buf)); break; }