Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a09de49

Browse files
authored
Merge pull request #1 from shts/feature/available-high-profile
Make available high profile
2 parents e9c411c + 6261e72 commit a09de49

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)

AltStyle によって変換されたページ (->オリジナル) /