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 26
26
class MediaFormatValidator {
27
27
// Refer: http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Profiles
28
28
private static final byte PROFILE_IDC_BASELINE = 66 ;
29
+ private static final byte PROFILE_IDC_HI = 100 ;
29
30
30
31
public static void validateVideoOutputFormat (MediaFormat format ) {
31
32
String mime = format .getString (MediaFormat .KEY_MIME );
@@ -36,7 +37,8 @@ public static void validateVideoOutputFormat(MediaFormat format) {
36
37
}
37
38
ByteBuffer spsBuffer = AvcCsdUtils .getSpsBuffer (format );
38
39
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 ) {
40
42
throw new InvalidOutputFormatException ("Non-baseline AVC video profile is not supported by Android OS, actual profile_idc: " + profileIdc );
41
43
}
42
44
}
You can’t perform that action at this time.
0 commit comments