Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b529e4c9 authored by Martin Storsjo's avatar Martin Storsjo Committed by Andreas Huber
Browse files

mediacodec: Don't suggest calling getOutputFormat() immediately

Calling getOutputFormat() at this point currently crashes in
native code. (After a fix to the native code, this gives an
IllegalStateException instead.)

Change-Id: Ia45c4820bb3d9ed435a0aeef1ff8c230524f2e1f
parent 6624afe3
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@ import java.util.Map;
 * codec.start();
 * ByteBuffer[] inputBuffers = codec.getInputBuffers();
 * ByteBuffer[] outputBuffers = codec.getOutputBuffers();
 * MediaFormat format = codec.getOutputFormat();
 * for (;;) {
 *   int inputBufferIndex = codec.dequeueInputBuffer(timeoutUs);
 *   if (inputBufferIndex >= 0) {
@@ -51,7 +50,7 @@ import java.util.Map;
 *     outputBuffers = codec.getOutputBuffers();
 *   } else if (outputBufferIndex == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED) {
 *     // Subsequent data will conform to new format.
 *     format = codec.getOutputFormat();
 *     MediaFormat format = codec.getOutputFormat();
 *     ...
 *   }
 * }