diff --git a/lib/src/main/java/net/ypresto/androidtranscoder/engine/MediaFormatValidator.java b/lib/src/main/java/net/ypresto/androidtranscoder/engine/MediaFormatValidator.java index 67ea5ba8..6182ee60 100644 --- a/lib/src/main/java/net/ypresto/androidtranscoder/engine/MediaFormatValidator.java +++ b/lib/src/main/java/net/ypresto/androidtranscoder/engine/MediaFormatValidator.java @@ -18,14 +18,8 @@ import android.media.MediaFormat; import net.ypresto.androidtranscoder.format.MediaFormatExtraConstants; -import net.ypresto.androidtranscoder.utils.AvcCsdUtils; -import net.ypresto.androidtranscoder.utils.AvcSpsUtils; - -import java.nio.ByteBuffer; class MediaFormatValidator { - // Refer: http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Profiles - private static final byte PROFILE_IDC_BASELINE = 66; public static void validateVideoOutputFormat(MediaFormat format) { String mime = format.getString(MediaFormat.KEY_MIME); @@ -34,11 +28,6 @@ public static void validateVideoOutputFormat(MediaFormat format) { if (!MediaFormatExtraConstants.MIMETYPE_VIDEO_AVC.equals(mime)) { throw new InvalidOutputFormatException("Video codecs other than AVC is not supported, actual mime type: " + mime); } - ByteBuffer spsBuffer = AvcCsdUtils.getSpsBuffer(format); - byte profileIdc = AvcSpsUtils.getProfileIdc(spsBuffer); - if (profileIdc != PROFILE_IDC_BASELINE) { - throw new InvalidOutputFormatException("Non-baseline AVC video profile is not supported by Android OS, actual profile_idc: " + profileIdc); - } } public static void validateAudioOutputFormat(MediaFormat format) {