File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
lib/src/main/java/net/ypresto/androidtranscoder/engine Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 2626class 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 }
You can’t perform that action at this time.
0 commit comments