AImageDecoder: return BAD_PARAMETER on null info
Bug: 186656488 Test: I4dc406e85709dda14af8b414e2da3d39bb07643b Change-Id: Ibd7c1c3d1319818e86ac29bdc231e0e05cec2132
This commit is contained in:
parent
3ec445926b
commit
6116e5c0d8
@ -506,7 +506,7 @@ int AImageDecoder_getFrameInfo(AImageDecoder* decoder,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int64_t AImageDecoderFrameInfo_getDuration(const AImageDecoderFrameInfo* info) {
|
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;
|
return toFrameInfo(info)->fDuration * 1'000'000;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user