diff options
author | Andreas Huber <andih@google.com> | 2011-04-27 15:00:29 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2011-04-27 15:01:50 -0700 |
commit | a488c7daf91357611fcdbff7a32e5a73ec630070 (patch) | |
tree | 97c78b62069152f668fe41b85b82a4b306b4d0ef /media/libstagefright | |
parent | dab0bea38ab2c2d6b52907b7f5684834c4979251 (diff) | |
download | frameworks_av-a488c7daf91357611fcdbff7a32e5a73ec630070.zip frameworks_av-a488c7daf91357611fcdbff7a32e5a73ec630070.tar.gz frameworks_av-a488c7daf91357611fcdbff7a32e5a73ec630070.tar.bz2 |
Fix omx_tests to no longer refer to test files that are no longer available.
Also make sure that a seek beyond EOF does not just seek the final syncframe.
Change-Id: I0a58490ef719ce095a94f1d6909c60eb20074a0b
Diffstat (limited to 'media/libstagefright')
-rw-r--r-- | media/libstagefright/SampleTable.cpp | 4 | ||||
-rw-r--r-- | media/libstagefright/omx/tests/OMXHarness.cpp | 16 |
2 files changed, 12 insertions, 8 deletions
diff --git a/media/libstagefright/SampleTable.cpp b/media/libstagefright/SampleTable.cpp index 08db902..ef4d3d0 100644 --- a/media/libstagefright/SampleTable.cpp +++ b/media/libstagefright/SampleTable.cpp @@ -453,6 +453,10 @@ status_t SampleTable::findSampleAtTime( } if (left == mNumSampleSizes) { + if (flags == kFlagAfter) { + return ERROR_OUT_OF_RANGE; + } + --left; } diff --git a/media/libstagefright/omx/tests/OMXHarness.cpp b/media/libstagefright/omx/tests/OMXHarness.cpp index 4f28855..54c0d77 100644 --- a/media/libstagefright/omx/tests/OMXHarness.cpp +++ b/media/libstagefright/omx/tests/OMXHarness.cpp @@ -487,14 +487,12 @@ static const char *GetURLForMime(const char *mime) { { "audio/3gpp", "file:///sdcard/media_api/video/H263_500_AMRNB_12.3gp" }, { "audio/amr-wb", - "file:///sdcard/media_api/music_perf/AMRWB/" - "NIN_AMR-WB_15.85kbps_16kbps.amr" }, + "file:///sdcard/media_api/music/" + "AI_AMR-WB_12.65kbps(13kbps)_16khz_mono_NMC.awb" }, { "audio/mp4a-latm", - "file:///sdcard/media_api/music_perf/AAC/" - "WC_AAC_80kbps_32khz_Stereo_1pCBR_SSE.mp4" }, + "file:///sdcard/media_api/video/H264_AAC.3gp" }, { "audio/mpeg", - "file:///sdcard/media_api/music_perf/MP3/" - "WC_256kbps_44.1khz_mono_CBR_DPA.mp3" } + "file:///sdcard/media_api/music/MP3CBR.mp3" } }; for (size_t i = 0; i < sizeof(kMimeToURL) / sizeof(kMimeToURL[0]); ++i) { @@ -626,8 +624,10 @@ status_t Harness::testSeek( requestedSeekTimeUs, requestedSeekTimeUs / 1E6); } - MediaBuffer *buffer; - options.setSeekTo(requestedSeekTimeUs); + MediaBuffer *buffer = NULL; + options.setSeekTo( + requestedSeekTimeUs, MediaSource::ReadOptions::SEEK_NEXT_SYNC); + if (seekSource->read(&buffer, &options) != OK) { CHECK_EQ(buffer, NULL); actualSeekTimeUs = -1; |