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

Commit cebdc84f authored by Surajit Podder's avatar Surajit Podder Committed by Steve Kondik
Browse files

libstagefright: Fix crash while setting buffer size

The format returned from MakeAVCCodecSpecificData may be
NULL and will crash on trying to set buffer size.

Added NULL check to avoid crash

Change-Id: I45485f820a6aa657e63aeeb6dd43061a2e3575e3
CRs-Fixed: 644331
parent c2cbd9c5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -625,6 +625,7 @@ sp<ABuffer> ElementaryStreamQueue::dequeueAccessUnitH264() {

            if (mFormat == NULL) {
                mFormat = MakeAVCCodecSpecificData(accessUnit);
                if (mFormat != NULL)
                    mFormat->setInt32(kKeyMaxInputSize, (8192 * 10));
            }