Skip to content

Commit

Permalink
[droidmedia] Fix Jolla C build. JB#55092
Browse files Browse the repository at this point in the history
  • Loading branch information
adenexter committed Aug 17, 2021
1 parent 2d80398 commit 73cb2f7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions droidmediacodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -774,12 +774,14 @@ unsigned int droid_media_codec_get_supported_color_formats(const char *mime, int

if (matchIndex >= 0) {
const android::sp<android::MediaCodecInfo> info = list->getCodecInfo(matchIndex);
if (info != nullptr) {
if (info != NULL) {
const android::sp<android::MediaCodecInfo::Capabilities> caps = info->getCapabilitiesFor(mime);
if (caps != nullptr) {
if (caps != NULL) {
android::Vector<uint32_t> colorFormats;
caps->getSupportedColorFormats(&colorFormats);
maxFormats = std::min<unsigned int>(maxFormats, colorFormats.size());
if (maxFormats > colorFormats.size()) {
maxFormats = colorFormats.size();
}
for (unsigned int i = 0; i < maxFormats; i++) {
formats[i] = colorFormats.itemAt(i);
}
Expand Down

0 comments on commit 73cb2f7

Please sign in to comment.