Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

大华摄像头遇到的问题 #1

Open
bulreed opened this issue May 10, 2016 · 0 comments
Open

大华摄像头遇到的问题 #1

bulreed opened this issue May 10, 2016 · 0 comments

Comments

@bulreed
Copy link

bulreed commented May 10, 2016

大华摄像头播放时遇到如下异常: 平台RK3288,Android版本4.4.4
java.lang.IllegalStateException
E/AndroidRuntime( 1926): at android.media.MediaCodec.getOutputFormatNative(Native Method)
E/AndroidRuntime( 1926): at android.media.MediaCodec.getOutputFormat(MediaCodec.java:533)
E/AndroidRuntime( 1926): at cn.cloudwalk.camera.VideoDecoder.init(VideoDecoder.java:157)
E/AndroidRuntime( 1926): at cn.cloudwalk.camera.DecodeStream.notifyOpened(DecodeStream.java:187)
E/AndroidRuntime( 1926): at cn.cloudwalk.camera.SCCallback.SCMessageHandler(SCCallback.java:23)
E/AndroidRuntime( 1926): at dalvik.system.NativeStart.run(Native Method)

代码对应format = mMediaCodec.getOutputFormat().getInteger(MediaFormat.KEY_COLOR_FORMAT);

如果注释掉上述代码,就会出现下面的Underflow异常
java.nio.BufferUnderflowException
E/AndroidRuntime( 2134): at java.nio.Buffer.checkGetBounds(Buffer.java:177)
E/AndroidRuntime( 2134): at java.nio.DirectByteBuffer.get(DirectByteBuffer.java:107)
E/AndroidRuntime( 2134): at java.nio.ByteBuffer.get(ByteBuffer.java:372)
E/AndroidRuntime( 2134): at cn.cloudwalk.camera.VideoDecoder.getOutput(VideoDecoder.java:99)
E/AndroidRuntime( 2134): at cn.cloudwalk.camera.DecodeStream$1.run(DecodeStream.java:59)
E/AndroidRuntime( 2134): at java.lang.Thread.run(Thread.java:841)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant