Fix picture codecheck in ext_encoder

Issue: https://gitee.com/openharmony/multimedia_image_framework/issues/IB3FAR

Signed-off-by: caochuan <caochuan@huawei.com>
Change-Id: I91b49494409bf115570be54e4870f79d4730955c
This commit is contained in:
caochuan 2024-11-11 14:23:55 +08:00
parent a5e143be42
commit 972059efd9

View File

@ -1659,12 +1659,15 @@ uint32_t ExtEncoder::EncodeHeifPicture(sptr<SurfaceBuffer>& mainSptr, SkImageInf
void ExtEncoder::CheckJpegAuxiliaryTagName()
{
if (picture_ == nullptr) {
return;
}
auto auxTypes = ImageUtils::GetAllAuxiliaryPictureType();
for (AuxiliaryPictureType auxType : auxTypes) {
if (!picture_->HasAuxiliaryPicture(auxType)) {
auto auxPicture = picture_->GetAuxiliaryPicture(auxType);
if (auxPicture == nullptr) {
continue;
}
auto auxPicture = picture_->GetAuxiliaryPicture(auxType);
AuxiliaryPictureInfo auxInfo = auxPicture->GetAuxiliaryPictureInfo();
auto iter = DEFAULT_AUXILIARY_TAG_MAP.find(auxType);
if (auxInfo.jpegTagName.size() == 0 && iter != DEFAULT_AUXILIARY_TAG_MAP.end()) {