Exception when calling setDataSource(FileDescriptor) method (failed.: status=0x80000000)

前端 未结 10 1097
野性不改
野性不改 2020-12-09 01:57

I\'m developing a video streaming application and I\'m getting stuck when calling set setDataSource with a FileDescriptor. I want my application to play the video as it is b

10条回答
  •  情深已故
    2020-12-09 02:43

    I was facing the same issue while loading video from obb extension file. i fixed it by replacing:

    mPlayer.setDataSource(fd); 
    

    with:

    mPlayer.setDataSource(fis.getFileDescriptor(),fis.getStartOffset(),fis.getLength());
    

    where fis is AssetFileDescriptor

提交回复
热议问题