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

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

am 426a0c33: am f388c9e6: am f3d3856f: Merge "Check for null codec from...

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

* commit '426a0c33':
  Check for null codec from AMediaCodec_createDecoderByType
parents aba56b64 426a0c33
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line 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) {
        if (strncmp(mime, "audio/", 6) == 0) {


            AMediaCodec *codec = AMediaCodec_createDecoderByType(mime);
            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
                            NULL /* window */, NULL /* drm */, 0 /* flags */) != AMEDIA_OK
                    || AMediaCodec_start(codec) != AMEDIA_OK
                    || AMediaCodec_start(codec) != AMEDIA_OK
                    || AMediaExtractor_selectTrack(ex, i) != AMEDIA_OK) {
                    || AMediaExtractor_selectTrack(ex, i) != AMEDIA_OK) {