File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
lib/src/main/java/net/ypresto/androidtranscoder/utils Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,8 @@ public class AvcCsdUtils {
30
30
// Refer: http://www.cardinalpeak.com/blog/the-h-264-sequence-parameter-set/
31
31
private static final byte AVC_SPS_NAL = 103 ; // 0<<7 + 3<<5 + 7<<0
32
32
// https://tools.ietf.org/html/rfc6184
33
- private static final byte AVC2_SPS_NAL = 39 ; // 0<<7 + 1<<5 + 7<<0
33
+ private static final byte AVC_SPS_NAL_2 = 39 ; // 0<<7 + 1<<5 + 7<<0
34
+ private static final byte AVC_SPS_NAL_3 = 71 ; // 0<<7 + 2<<5 + 7<<0
34
35
35
36
/**
36
37
* @return ByteBuffer contains SPS without NAL header.
@@ -44,7 +45,7 @@ public static ByteBuffer getSpsBuffer(MediaFormat format) {
44
45
skipStartCode (prefixedSpsBuffer );
45
46
46
47
byte spsNalData = prefixedSpsBuffer .get ();
47
- if (spsNalData != AVC_SPS_NAL && spsNalData != AVC2_SPS_NAL ) {
48
+ if (spsNalData != AVC_SPS_NAL && spsNalData != AVC_SPS_NAL_2 && spsNalData != AVC_SPS_NAL_3 ) {
48
49
throw new IllegalStateException ("Got non SPS NAL data." );
49
50
}
50
51
You can’t perform that action at this time.
0 commit comments