Skip to content

Crash on one plus phone  #18

Description

@shoulderdh

here is my solution:

replace a method at MediaVideoEncoderBase

protected MediaFormat create_encoder_format1(final String mime, final int frame_rate, final int bitrate) { if (DEBUG) Log.v(TAG, String.format("create_encoder_format:(%d,%d),mime=%s,frame_rate=%d,bitrate=%d", 720, 1280, mime, frame_rate, bitrate)); final MediaFormat format = MediaFormat.createVideoFormat(mime, 720, 1280); format.setInteger(MediaFormat.KEY_COLOR_FORMAT, MediaCodecInfo.CodecCapabilities.COLOR_FormatSurface); // API >= 18 format.setInteger(MediaFormat.KEY_BIT_RATE, bitrate > 0 ? bitrate : calcBitRate(frame_rate)); //800000 format.setInteger(MediaFormat.KEY_FRAME_RATE,30); format.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, 10); return format; }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions