diff options
author | Andreas Huber <andih@google.com> | 2012-08-07 14:24:00 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2012-08-07 14:24:00 -0700 |
commit | 51d7547944967d1157b7fe18e1fb8f7ee6810412 (patch) | |
tree | 5c5d6cb884a163c7ea1f23899776f856fefbd1fa /media/libstagefright/omx/tests | |
parent | e671207115fac3914134c61b336d5fa0242c68ca (diff) | |
download | frameworks_av-51d7547944967d1157b7fe18e1fb8f7ee6810412.zip frameworks_av-51d7547944967d1157b7fe18e1fb8f7ee6810412.tar.gz frameworks_av-51d7547944967d1157b7fe18e1fb8f7ee6810412.tar.bz2 |
Only emit padding at the end of the stream in the aac and mp3 decoders
if we actually discarded content at the beginning of the stream.
Change-Id: I1e79835bb3a02350060a137b94f85f2c90f4a12b
Diffstat (limited to 'media/libstagefright/omx/tests')
-rw-r--r-- | media/libstagefright/omx/tests/OMXHarness.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/media/libstagefright/omx/tests/OMXHarness.cpp b/media/libstagefright/omx/tests/OMXHarness.cpp index fab1771..4b369ed 100644 --- a/media/libstagefright/omx/tests/OMXHarness.cpp +++ b/media/libstagefright/omx/tests/OMXHarness.cpp @@ -515,7 +515,10 @@ static const char *GetURLForMime(const char *mime) { static sp<MediaSource> CreateSourceForMime(const char *mime) { const char *url = GetURLForMime(mime); - CHECK(url != NULL); + + if (url == NULL) { + return NULL; + } sp<MediaExtractor> extractor = CreateExtractorFromURI(url); @@ -571,14 +574,22 @@ status_t Harness::testSeek( const char *mime = GetMimeFromComponentRole(componentRole); if (!mime) { - ALOGI("Cannot perform seek test with this componentRole (%s)", - componentRole); + printf(" * Cannot perform seek test with this componentRole (%s)\n", + componentRole); return OK; } sp<MediaSource> source = CreateSourceForMime(mime); + if (source == NULL) { + printf(" * Unable to open test content for type '%s', " + "skipping test of componentRole %s\n", + mime, componentRole); + + return OK; + } + sp<MediaSource> seekSource = CreateSourceForMime(mime); if (source == NULL || seekSource == NULL) { return UNKNOWN_ERROR; |