Catch RuntimeException thrown by MediaMetadataRetriever

This commit is contained in:
daniel oeh 2013-04-07 12:21:41 +02:00
parent 02f3cdfb42
commit e5b9b68e28
1 changed files with 7 additions and 2 deletions

View File

@ -69,6 +69,11 @@ public class ExternalMedia implements Playable {
e.printStackTrace(); e.printStackTrace();
throw new PlayableException( throw new PlayableException(
"IllegalArgumentException when setting up MediaMetadataReceiver"); "IllegalArgumentException when setting up MediaMetadataReceiver");
} catch (RuntimeException e) {
// http://code.google.com/p/android/issues/detail?id=39770
e.printStackTrace();
throw new PlayableException(
"RuntimeException when setting up MediaMetadataRetriever");
} }
episodeTitle = mmr episodeTitle = mmr
.extractMetadata(MediaMetadataRetriever.METADATA_KEY_TITLE); .extractMetadata(MediaMetadataRetriever.METADATA_KEY_TITLE);
@ -78,10 +83,10 @@ public class ExternalMedia implements Playable {
.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION)); .extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION));
ChapterUtils.loadChaptersFromFileUrl(this); ChapterUtils.loadChaptersFromFileUrl(this);
} }
@Override @Override
public void loadChapterMarks() { public void loadChapterMarks() {
} }
@Override @Override