日期:2014-05-20  浏览次数:20720 次

[求助]播放手机上的视频文件问题
我在N73上播放本地的视频文件(3gp格式的),第一次播放时没有异常,返回上个界面后再播放这个文件就出现下面的异常:
java.io.IOException:   File   is   used   by   other   application
请问这个异常应该怎么解决啊?
下面是播放视频的代码:
  public   void   showVideo(String   strFileName)   {
      FileConnection   fc   =   (FileConnection)Connector.open(strFileName);
      p   =   Manager.createPlayer(fc.openInputStream(),   "video/3gpp ");
      fc.close();
      fc   =   null;
      p.prefetch();
      vc   =   (VideoControl)p.getControl( "VideoControl ");
      if   (vc   !=   null)   {
        vc.initDisplayMode(VideoControl.USE_DIRECT_VIDEO,   this);
        vc.setVisible(true);
        p.start();
      }
  }


------解决方案--------------------
播放完了,要close()的,释放player的资源。

saltedfish
------解决方案--------------------
释放player的资源。