Merge "Fix CTS tests" into rvc-dev am: 881b688f68 am: 2402bf11fd
Change-Id: I9a39c83e5a86a809ec5880201d15ff503e1028f2
This commit is contained in:
@@ -700,30 +700,34 @@ public final class MediaParser {
|
||||
mDataSource.mInputReader = seekableInputReader;
|
||||
|
||||
// TODO: Apply parameters when creating extractor instances.
|
||||
if (mExtractorName != null) {
|
||||
mExtractor = EXTRACTOR_FACTORIES_BY_NAME.get(mExtractorName).createInstance();
|
||||
} else if (mExtractor == null) {
|
||||
for (String parserName : mParserNamesPool) {
|
||||
Extractor extractor = EXTRACTOR_FACTORIES_BY_NAME.get(parserName).createInstance();
|
||||
try {
|
||||
if (extractor.sniff(mExtractorInput)) {
|
||||
mExtractorName = parserName;
|
||||
mExtractor = extractor;
|
||||
mExtractor.init(new ExtractorOutputAdapter());
|
||||
break;
|
||||
if (mExtractor == null) {
|
||||
if (mExtractorName != null) {
|
||||
mExtractor = EXTRACTOR_FACTORIES_BY_NAME.get(mExtractorName).createInstance();
|
||||
mExtractor.init(new ExtractorOutputAdapter());
|
||||
} else {
|
||||
for (String parserName : mParserNamesPool) {
|
||||
Extractor extractor =
|
||||
EXTRACTOR_FACTORIES_BY_NAME.get(parserName).createInstance();
|
||||
try {
|
||||
if (extractor.sniff(mExtractorInput)) {
|
||||
mExtractorName = parserName;
|
||||
mExtractor = extractor;
|
||||
mExtractor.init(new ExtractorOutputAdapter());
|
||||
break;
|
||||
}
|
||||
} catch (EOFException e) {
|
||||
// Do nothing.
|
||||
} catch (IOException | InterruptedException e) {
|
||||
throw new IllegalStateException(e);
|
||||
} finally {
|
||||
mExtractorInput.resetPeekPosition();
|
||||
}
|
||||
} catch (EOFException e) {
|
||||
// Do nothing.
|
||||
} catch (IOException | InterruptedException e) {
|
||||
throw new IllegalStateException(e);
|
||||
} finally {
|
||||
mExtractorInput.resetPeekPosition();
|
||||
}
|
||||
if (mExtractor == null) {
|
||||
throw UnrecognizedInputFormatException.createForExtractors(mParserNamesPool);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (mExtractor == null) {
|
||||
throw UnrecognizedInputFormatException.createForExtractors(mParserNamesPool);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (isPendingSeek()) {
|
||||
|
||||
Reference in New Issue
Block a user