3

大家好,我的应用在尝试在 Android 4.4 (KitKat) 中播放视频时返回失败代码 -32。

我实际上找不到有关此错误代码的任何信息,也许你们中的任何人都对此问题了解更多?

11-04 13:43:08.966: E/AndroidRuntime(26482): java.lang.RuntimeException: failure code: -32
11-04 13:43:08.966: E/AndroidRuntime(26482):    at android.media.MediaPlayer.invoke(MediaPlayer.java:664)
11-04 13:43:08.966: E/AndroidRuntime(26482):    at android.media.MediaPlayer.getInbandTrackInfo(MediaPlayer.java:1692)
11-04 13:43:08.966: E/AndroidRuntime(26482):    at android.media.MediaPlayer.scanInternalSubtitleTracks(MediaPlayer.java:1851)
11-04 13:43:08.966: E/AndroidRuntime(26482):    at android.media.MediaPlayer.access$600(MediaPlayer.java:529)
11-04 13:43:08.966: E/AndroidRuntime(26482):    at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:2198)
11-04 13:43:08.966: E/AndroidRuntime(26482):    at android.os.Handler.dispatchMessage(Handler.java:102)
11-04 13:43:08.966: E/AndroidRuntime(26482):    at android.os.Looper.loop(Looper.java:137)
11-04 13:43:08.966: E/AndroidRuntime(26482):    at android.app.ActivityThread.main(ActivityThread.java:4998)
11-04 13:43:08.966: E/AndroidRuntime(26482):    at java.lang.reflect.Method.invokeNative(Native Method)
11-04 13:43:08.966: E/AndroidRuntime(26482):    at java.lang.reflect.Method.invoke(Method.java:515)
11-04 13:43:08.966: E/AndroidRuntime(26482):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
11-04 13:43:08.966: E/AndroidRuntime(26482):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
11-04 13:43:08.966: E/AndroidRuntime(26482):    at dalvik.system.NativeStart.main(Native Method)
4

2 回答 2

3

我有同样的问题,这对我有帮助https://groups.google.com/forum/#!topic/ima-sdk/dTkE2BmH1mw。这是我在项目中如何做到的示例(这是播放列表的简单循环):

     videoView = (VideoView)findViewById(R.id.videoView);
     videoView.requestFocus();
     videoView.start();
     videoView.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
       public void onCompletion(MediaPlayer mp) {
         mp.setDisplay(null);
         mp.reset();
         mp.setDisplay(videoView.getHolder());

         PlaylistItem next = playlistAdapter.getNext(lastVideo.id);
         if (next != null && lastVideo.URL != null) {
         lastVideo = next;
         videoView.setVideoURI(next.getLocalFileURI());
         videoView.requestFocus();
         videoView.start();
       }
     });

以下几行

     mp.setDisplay(null);
     mp.reset();
     mp.setDisplay(videoView.getHolder());

做的伎俩。

于 2014-12-25T18:17:36.607 回答
0

找到了答案。我正在使用 IMAVideoPlayer(用于广告)。只需要更新 sdk.jar。现在在 KitKat 上一切正常。

于 2013-11-04T14:22:15.017 回答