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

Commit a2081368 authored by Andy McFadden's avatar Andy McFadden
Browse files

Another error check

Change-Id: I01ed5c0c7dcb520732d2856859bced31df5fbbb5
parent 2533c83b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -143,6 +143,10 @@ static status_t prepareEncoder(float displayFps, sp<MediaCodec>* pCodec,
    looper->start();
    ALOGV("Creating codec");
    sp<MediaCodec> codec = MediaCodec::CreateByType(looper, "video/avc", true);
    if (codec == NULL) {
        fprintf(stderr, "ERROR: unable to create video/avc codec instance\n");
        return UNKNOWN_ERROR;
    }
    err = codec->configure(format, NULL, NULL,
            MediaCodec::CONFIGURE_FLAG_ENCODE);
    if (err != NO_ERROR) {