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 | 85adf5e56235bcea2f8991d983b94f4199e28faa (patch) | |
tree | def30b7d4de8a2d5547bcf76624d674f01d1f1e2 /media/libstagefright/codecs/avc | |
parent | d8729c597b9fe8cbdbf145bea0dbaec4f075015b (diff) | |
download | frameworks_base-85adf5e56235bcea2f8991d983b94f4199e28faa.zip frameworks_base-85adf5e56235bcea2f8991d983b94f4199e28faa.tar.gz frameworks_base-85adf5e56235bcea2f8991d983b94f4199e28faa.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')
-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() { |