Fix CTS tests
Broken since behavioral parameters were added. Test: CTS. Bug: 150321580 Bug: 147308781 Bug: 149906115 Change-Id: I8629a78e547cba3552bcc73c0dd55b9317611156
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