diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-02-01 00:59:51 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-02-01 00:59:51 +0000 |
commit | dc4b37a42ae923a6e486abdae662a8a85ed3e127 (patch) | |
tree | b9b5255a8c52d7d3ce54bce360660c5705f97389 | |
parent | d1fb98272d4b264fba77130f30922f4d5966c8c3 (diff) | |
parent | d75395e5554212b3fcb299f428596539c78b2061 (diff) | |
download | av-android14-d2-s5-release.tar.gz |
Merge cherrypicks of ['googleplex-android-review.googlesource.com/25545533', 'googleplex-android-review.googlesource.com/25575421'] into udc-d2-release.android-14.0.0_r45android-14.0.0_r44android-14.0.0_r43android-14.0.0_r42android-14.0.0_r41android-14.0.0_r40android-14.0.0_r39android-14.0.0_r38android14-d2-s5-releaseandroid14-d2-s4-releaseandroid14-d2-s3-releaseandroid14-d2-s2-releaseandroid14-d2-s1-releaseandroid14-d2-release
Change-Id: I24f0b15188ec2e2ac9f70f203a75ac8b1eda015b
-rw-r--r-- | media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp | 7 | ||||
-rw-r--r-- | media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp index a4b3e2f434..14c3fa0875 100644 --- a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp +++ b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp @@ -312,8 +312,11 @@ void SoftMPEG4::onQueueFilled(OMX_U32 /* portIndex */) { outHeader->nFilledLen = frameSize; List<BufferInfo *>::iterator it = outQueue.begin(); - while ((*it)->mHeader != outHeader) { - ++it; + while (it != outQueue.end() && (*it)->mHeader != outHeader) { + ++it; + } + if (it == outQueue.end()) { + return; } BufferInfo *outInfo = *it; diff --git a/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp b/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp index e853da9763..418302389d 100644 --- a/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp +++ b/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp @@ -616,6 +616,10 @@ OMX_ERRORTYPE SoftVideoDecoderOMXComponent::getConfig( DescribeHDR10PlusInfoParams* outParams = (DescribeHDR10PlusInfoParams *)params; + if (!isValidOMXParam(outParams)) { + return OMX_ErrorBadParameter; + } + outParams->nParamSizeUsed = info->size(); // If the buffer provided by the client does not have enough @@ -694,6 +698,10 @@ OMX_ERRORTYPE SoftVideoDecoderOMXComponent::internalSetConfig( const DescribeHDR10PlusInfoParams* inParams = (DescribeHDR10PlusInfoParams *)params; + if (!isValidOMXParam(inParams)) { + return OMX_ErrorBadParameter; + } + if (*frameConfig) { // This is a request to append to the current frame config set. // For now, we only support kDescribeHdr10PlusInfoIndex, which |