Skip to content

Commit f86374a

Browse files
committed
Remove SEEK_CLOSEST constant from MediaExtractor, its implementation makes no
sense for the java API. Change-Id: I3f2eabb5ca5ffb6c1f03141bfd303310111e8774 related-to-bug: 6276111
1 parent 2f4b10e commit f86374a

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

api/current.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11236,7 +11236,6 @@ package android.media {
1123611236
method public void unselectTrack(int);
1123711237
field public static final int SAMPLE_FLAG_ENCRYPTED = 2; // 0x2
1123811238
field public static final int SAMPLE_FLAG_SYNC = 1; // 0x1
11239-
field public static final int SEEK_TO_CLOSEST = 3; // 0x3
1124011239
field public static final int SEEK_TO_CLOSEST_SYNC = 2; // 0x2
1124111240
field public static final int SEEK_TO_NEXT_SYNC = 1; // 0x1
1124211241
field public static final int SEEK_TO_PREVIOUS_SYNC = 0; // 0x0

media/java/android/media/MediaExtractor.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,6 @@ public MediaFormat getTrackFormat(int index) {
225225
* If possible, seek to the sync sample closest to the specified time
226226
*/
227227
public static final int SEEK_TO_CLOSEST_SYNC = 2;
228-
/**
229-
* If possible, seek to a sample closest to the specified time, which may
230-
* NOT be a sync sample!
231-
*/
232-
public static final int SEEK_TO_CLOSEST = 3;
233228

234229
/**
235230
* All selected tracks seek near the requested time according to the

media/jni/android_media_MediaExtractor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ static void android_media_MediaExtractor_seekTo(
313313
}
314314

315315
if (mode < MediaSource::ReadOptions::SEEK_PREVIOUS_SYNC
316-
|| mode > MediaSource::ReadOptions::SEEK_CLOSEST) {
316+
|| mode >= MediaSource::ReadOptions::SEEK_CLOSEST) {
317317
jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
318318
return;
319319
}

0 commit comments

Comments
 (0)