commit | 6116e5c0d894c3e5a32138b3ff1f50cbc80d304c | [log] [tgz] |
---|---|---|
author | Leon Scroggins III <scroggo@google.com> | Mon May 03 11:34:34 2021 -0400 |
committer | Leon Scroggins III <scroggo@google.com> | Mon May 03 11:34:34 2021 -0400 |
tree | 68e64cbc098b31d4dad63c1d178091d39eb8cb16 | |
parent | 3ec445926ba8cb20295eb80e64939b017565ba51 [diff] [blame] |
AImageDecoder: return BAD_PARAMETER on null info Bug: 186656488 Test: I4dc406e85709dda14af8b414e2da3d39bb07643b Change-Id: Ibd7c1c3d1319818e86ac29bdc231e0e05cec2132
diff --git a/native/graphics/jni/imagedecoder.cpp b/native/graphics/jni/imagedecoder.cpp index b0c8c61..a0f3098 100644 --- a/native/graphics/jni/imagedecoder.cpp +++ b/native/graphics/jni/imagedecoder.cpp
@@ -506,7 +506,7 @@ } int64_t AImageDecoderFrameInfo_getDuration(const AImageDecoderFrameInfo* info) { - if (!info) return 0; + if (!info) return ANDROID_IMAGE_DECODER_BAD_PARAMETER; return toFrameInfo(info)->fDuration * 1'000'000; }