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
This commit is contained in:
Martin Storsjo
2012-07-13 12:57:13 +03:00
parent 13a3a87fa7
commit fdd3241a24

View File

@@ -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();
* ...
* }
* }