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 {
3030 // Refer: http://www.cardinalpeak.com/blog/the-h-264-sequence-parameter-set/
3131 private static final byte AVC_SPS_NAL = 103 ; // 0<<7 + 3<<5 + 7<<0
3232 // 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
3435
3536 /**
3637 * @return ByteBuffer contains SPS without NAL header.
@@ -44,7 +45,7 @@ public static ByteBuffer getSpsBuffer(MediaFormat format) {
4445 skipStartCode (prefixedSpsBuffer );
4546
4647 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 ) {
4849 throw new IllegalStateException ("Got non SPS NAL data." );
4950 }
5051
You can’t perform that action at this time.
0 commit comments