java.lang.RuntimeException: setDataSource failed: status = 0xFFFFFFED in android?

8.5k views Asked by At

Here is my code:

MediaMetadataRetriever metadataRetriever;
metadataRetriever = new MediaMetadataRetriever();
metadataRetriever.setDataSource(mediaFile.getAbsolutePath());

I get exception like this:

E/AndroidRuntime( 3247): Caused by: java.lang.RuntimeException: setDataSource failed: status = 0xFFFFFFED
E/AndroidRuntime( 3247):        at android.media.MediaMetadataRetriever.setDataSource(Native Method)
E/AndroidRuntime( 3247):        at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:70)
E/AndroidRuntime( 3247):        at com.skyworth.tvfileexplorer.utils.FileUtils.getPreview(FileUtils.java:544)
E/AndroidRuntime( 3247):        at com.skyworth.tvfileexplorer.app.folders.CardPreviewer.doInBackground(CardPreviewer.java:33)
E/AndroidRuntime( 3247):        at com.skyworth.tvfileexplorer.app.folders.CardPreviewer.doInBackground(CardPreviewer.java:13)
1

There are 1 answers

0
dredusher On

I was getting the same error when redefining the MediaMetadataRetriever a number of times. Changed this to have a single static declaration and the problem has gone away. Using 4.4.2.