diff options
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() { |