From 11dc33bea09febc98474fcb0cb3fbd8769dd21ae Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Thu, 18 Jun 2009 12:13:28 +0200 Subject: aacparse: ADIF: do not send bogus timestamps, leave to downstream (decoder) --- gst/aacparse/gstaacparse.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gst/aacparse') diff --git a/gst/aacparse/gstaacparse.c b/gst/aacparse/gstaacparse.c index 07906347..6db4b619 100644 --- a/gst/aacparse/gstaacparse.c +++ b/gst/aacparse/gstaacparse.c @@ -664,8 +664,12 @@ gst_aacparse_parse_frame (GstBaseParse * parse, GstBuffer * buffer) } } - GST_BUFFER_DURATION (buffer) = AAC_FRAME_DURATION (aacparse); - GST_BUFFER_TIMESTAMP (buffer) = aacparse->ts; + /* ADIF: only send an initial 0 timestamp downstream, + * then admit we have no idea and let downstream (decoder) handle it */ + if (aacparse->header_type != DSPAAC_HEADER_ADIF || !aacparse->ts) { + GST_BUFFER_DURATION (buffer) = AAC_FRAME_DURATION (aacparse); + GST_BUFFER_TIMESTAMP (buffer) = aacparse->ts; + } if (GST_CLOCK_TIME_IS_VALID (aacparse->ts)) aacparse->ts += GST_BUFFER_DURATION (buffer); -- cgit v1.2.1