0

我在尝试播放视频时收到一个奇怪的错误代码。

我得到错误代码 1(即 ERROR_UNKNOWN)和额外的 -2005,它根本没有任何文档。

我怎么可能知道为什么会这样?

谢谢

01-09 09:50:36.903: E/MediaPlayer(3062): Error (1,-2005)

这是我播放视频的部分

if(m_videoView.canSeekForward() && seekTo > 0 && seekTo <= m_videoView.getDuration())
                    m_videoView.seekTo(seekTo);
                m_videoView.start();
                m_videoView.requestFocus();
                m_videoView.setKeepScreenOn(true);

这是我获得播放网址的地方

String url = data.replace('\"', ' ').trim();
                        try
                        {
                            URL _url = new URL(url);
                            _url.toURI();
                        }
                        catch(URISyntaxException ex)
                        {
                            Log.e("url from media", ex.getMessage() + " for " + url);
                            SystemUtils.alertMsg(getContext(), "There is a problem with this film right now.\nPlease try again later.");//getContext().getResources().getString(R.string.not_subscribed_msg));
                            dismiss(); 
                            playerLayout.findViewWithTag("progressbar").setVisibility(View.GONE);
                            return;  
                        } 
                        catch (MalformedURLException e) 
                        {
                            Log.e("url from media", e.getMessage() + " for " + url);
                            SystemUtils.alertMsg(getContext(), "There is a problem with this film right now.\nPlease try again later.");//getContext().getResources().getString(R.string.not_subscribed_msg));
                            dismiss();
                            playerLayout.findViewWithTag("progressbar").setVisibility(View.GONE);
                            return;
                        }

                        url = url.replace("http", "widevine").replace("16.109", "16.1");  

                        setFilePath(url);
4

1 回答 1

2

-2005错误代码可能在ICS 及更高版本上ERROR_DRM_DECRYPT(参见http://code.metager.de/source/xref/android/4.1.1/frameworks/av/include/media/stagefright/MediaErrors.h#54 )。

编辑DRM_ERROR_CANNOT_HANDLE:如果您使用 Gingerbread 或更早,也可能是这样。

于 2013-01-09T08:26:12.790 回答