summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/StagefrightMetadataRetriever.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-05-20 10:37:06 -0700
committerAndreas Huber <andih@google.com>2010-05-20 10:37:06 -0700
commit139a5d5bd33c9fc7708d0a79f11ee928f7796e6b (patch)
tree18ab9da463636f4eecd524cadd5ddaf5c525f21d /media/libstagefright/StagefrightMetadataRetriever.cpp
parent1edbcb2bb9988cc7cb54a865aaea4613bdd53a9d (diff)
downloadframeworks_av-139a5d5bd33c9fc7708d0a79f11ee928f7796e6b.zip
frameworks_av-139a5d5bd33c9fc7708d0a79f11ee928f7796e6b.tar.gz
frameworks_av-139a5d5bd33c9fc7708d0a79f11ee928f7796e6b.tar.bz2
Better handling of codec initialization failure in the player and thumbnail extractor. Return a runtime error instead of asserting if the software MPEG4/H.263 decoder fails to initialize.
Change-Id: I5cba02ee85a41e43c2623053de40f26e2cf2efe4 related-to-bug: 2699505
Diffstat (limited to 'media/libstagefright/StagefrightMetadataRetriever.cpp')
-rw-r--r--media/libstagefright/StagefrightMetadataRetriever.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/media/libstagefright/StagefrightMetadataRetriever.cpp b/media/libstagefright/StagefrightMetadataRetriever.cpp
index 2968917..258be74 100644
--- a/media/libstagefright/StagefrightMetadataRetriever.cpp
+++ b/media/libstagefright/StagefrightMetadataRetriever.cpp
@@ -120,7 +120,11 @@ static VideoFrame *extractVideoFrameWithCodecFlags(
return NULL;
}
- decoder->start();
+ status_t err = decoder->start();
+ if (err != OK) {
+ LOGW("OMXCodec::start returned error %d (0x%08x)\n", err, err);
+ return NULL;
+ }
// Read one output buffer, ignore format change notifications
// and spurious empty buffers.
@@ -134,7 +138,6 @@ static VideoFrame *extractVideoFrameWithCodecFlags(
}
MediaBuffer *buffer = NULL;
- status_t err;
do {
if (buffer != NULL) {
buffer->release();