Skip to content

Commit 6261e72

Browse files
committed
Make available high profile
1 parent e9c411c commit 6261e72

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/src/main/java/net/ypresto/androidtranscoder/engine/MediaFormatValidator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
class MediaFormatValidator {
2727
// Refer: http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Profiles
2828
private static final byte PROFILE_IDC_BASELINE = 66;
29+
private static final byte PROFILE_IDC_HI = 100;
2930

3031
public static void validateVideoOutputFormat(MediaFormat format) {
3132
String mime = format.getString(MediaFormat.KEY_MIME);
@@ -36,7 +37,8 @@ public static void validateVideoOutputFormat(MediaFormat format) {
3637
}
3738
ByteBuffer spsBuffer = AvcCsdUtils.getSpsBuffer(format);
3839
byte profileIdc = AvcSpsUtils.getProfileIdc(spsBuffer);
39-
if (profileIdc != PROFILE_IDC_BASELINE) {
40+
boolean availableProfile = (profileIdc == PROFILE_IDC_BASELINE || profileIdc == PROFILE_IDC_HI);
41+
if (!availableProfile) {
4042
throw new InvalidOutputFormatException("Non-baseline AVC video profile is not supported by Android OS, actual profile_idc: " + profileIdc);
4143
}
4244
}

0 commit comments

Comments
 (0)