diff options
author | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2009-06-18 12:13:28 +0200 |
---|---|---|
committer | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2009-06-19 18:13:09 +0200 |
commit | 11dc33bea09febc98474fcb0cb3fbd8769dd21ae (patch) | |
tree | 0c37d9c5dc3e0151b0803c970c3e58f422228e9c /gst/aacparse | |
parent | e29be2546f1fefc35a78a85efc336810ac2f2c2c (diff) | |
download | gst-plugins-bad-11dc33bea09febc98474fcb0cb3fbd8769dd21ae.tar.gz gst-plugins-bad-11dc33bea09febc98474fcb0cb3fbd8769dd21ae.tar.bz2 gst-plugins-bad-11dc33bea09febc98474fcb0cb3fbd8769dd21ae.zip |
aacparse: ADIF: do not send bogus timestamps, leave to downstream (decoder)
Diffstat (limited to 'gst/aacparse')
-rw-r--r-- | gst/aacparse/gstaacparse.c | 8 |
1 files changed, 6 insertions, 2 deletions
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); |