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

Commit f388c9e6 authored by Andy Hung's avatar Andy Hung Committed by Android Git Automerger
Browse files

am f3d3856f: Merge "Check for null codec from AMediaCodec_createDecoderByType" into mnc-dev

* commit 'f3d3856f':
  Check for null codec from AMediaCodec_createDecoderByType
parents c7bf0a6a f3d3856f
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -514,7 +514,8 @@ static status_t decode(int fd, int64_t offset, int64_t length,
        if (strncmp(mime, "audio/", 6) == 0) {

            AMediaCodec *codec = AMediaCodec_createDecoderByType(mime);
            if (AMediaCodec_configure(codec, format,
            if (codec == NULL
                    || AMediaCodec_configure(codec, format,
                            NULL /* window */, NULL /* drm */, 0 /* flags */) != AMEDIA_OK
                    || AMediaCodec_start(codec) != AMEDIA_OK
                    || AMediaExtractor_selectTrack(ex, i) != AMEDIA_OK) {