Skip to content

Commit

Permalink
Try initializing ADAPTATION_WORKAROUND_BUFFER as a byte[]
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 270999947
  • Loading branch information
ojw28 committed Oct 2, 2019
1 parent fa80396 commit e4cabca
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,17 @@ private static String getDiagnosticInfoV21(Throwable cause) {
private static final int ADAPTATION_WORKAROUND_MODE_ALWAYS = 2;

/**
* H.264/AVC buffer to queue when using the adaptation workaround (see
* {@link #codecAdaptationWorkaroundMode(String)}. Consists of three NAL units with start codes:
* Baseline sequence/picture parameter sets and a 32 * 32 pixel IDR slice. This stream can be
* queued to force a resolution change when adapting to a new format.
* H.264/AVC buffer to queue when using the adaptation workaround (see {@link
* #codecAdaptationWorkaroundMode(String)}. Consists of three NAL units with start codes: Baseline
* sequence/picture parameter sets and a 32 * 32 pixel IDR slice. This stream can be queued to
* force a resolution change when adapting to a new format.
*/
private static final byte[] ADAPTATION_WORKAROUND_BUFFER = Util.getBytesFromHexString(
"0000016742C00BDA259000000168CE0F13200000016588840DCE7118A0002FBF1C31C3275D78");
private static final byte[] ADAPTATION_WORKAROUND_BUFFER =
new byte[] {
0, 0, 1, 103, 66, -64, 11, -38, 37, -112, 0, 0, 1, 104, -50, 15, 19, 32, 0, 0, 1, 101, -120,
-124, 13, -50, 113, 24, -96, 0, 47, -65, 28, 49, -61, 39, 93, 120
};

private static final int ADAPTATION_WORKAROUND_SLICE_WIDTH_HEIGHT = 32;

private final MediaCodecSelector mediaCodecSelector;
Expand Down

0 comments on commit e4cabca

Please sign in to comment.