Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 65f4e3a2 authored by Leena Winterrowd's avatar Leena Winterrowd Committed by Steve Kondik
Browse files

NuPlayer: Check if video input format is NULL

Adds null check on querying for video input format metadata.
CRs-Fixed: 582533

Change-Id: I3832de56f67bf8e6b4abb426c6e539dd66009fa5
parent 768f8dbf
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -666,7 +666,9 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {

                    // Take into account sample aspect ratio if necessary:
                    int32_t sarWidth, sarHeight;
                    if (videoInputFormat->findInt32("sar-width", &sarWidth)
                    if (videoInputFormat != NULL
                            && videoInputFormat->findInt32(
                                "sar-width", &sarWidth)
                            && videoInputFormat->findInt32(
                                "sar-height", &sarHeight)) {
                        ALOGV("Sample aspect ratio %d : %d",