From 85adf5e56235bcea2f8991d983b94f4199e28faa Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Fri, 11 Dec 2009 11:27:02 -0800 Subject: Propagate duration from input to output only if available, support multiple full frames of audio per input buffer in AMR/AAC decoders. --- media/libstagefright/codecs/avc/dec/AVCDecoder.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'media/libstagefright/codecs/avc') diff --git a/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp b/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp index 00e0046..7e18c1f 100644 --- a/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp +++ b/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp @@ -63,6 +63,11 @@ AVCDecoder::AVCDecoder(const sp &source) mFormat->setInt32(kKeyHeight, height); mFormat->setInt32(kKeyColorFormat, OMX_COLOR_FormatYUV420Planar); mFormat->setCString(kKeyDecoderComponent, "AVCDecoder"); + + int64_t durationUs; + if (mSource->getFormat()->findInt64(kKeyDuration, &durationUs)) { + mFormat->setInt64(kKeyDuration, durationUs); + } } AVCDecoder::~AVCDecoder() { -- cgit v1.1