diff options
author | Andreas Huber <andih@google.com> | 2009-12-11 11:27:02 -0800 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2009-12-11 11:27:02 -0800 |
commit | 6b91407a918d755454ed396068ff7f67b7088f34 (patch) | |
tree | ff38d37a9acdcf4a0890501402c835b77538cf8a /media/libstagefright/codecs/avc/dec | |
parent | 72124cf05cd5b40f2902198aca2797616b813457 (diff) | |
download | frameworks_av-6b91407a918d755454ed396068ff7f67b7088f34.zip frameworks_av-6b91407a918d755454ed396068ff7f67b7088f34.tar.gz frameworks_av-6b91407a918d755454ed396068ff7f67b7088f34.tar.bz2 |
Propagate duration from input to output only if available, support multiple full frames of audio per input buffer in AMR/AAC decoders.
Diffstat (limited to 'media/libstagefright/codecs/avc/dec')
-rw-r--r-- | media/libstagefright/codecs/avc/dec/AVCDecoder.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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<MediaSource> &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() { |