mirror of
https://github.com/samsonjs/media.git
synced 2026-03-27 09:45:47 +00:00
Throw NPE instead of IAE when sampleMimeType is null.
PiperOrigin-RevId: 422550627
This commit is contained in:
parent
7ba79cfa42
commit
e0aa61681d
1 changed files with 0 additions and 2 deletions
|
|
@ -101,14 +101,12 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
|||
|
||||
@Override
|
||||
public Codec createForVideoEncoding(Format format) throws TransformationException {
|
||||
checkArgument(format.sampleMimeType != null);
|
||||
checkArgument(format.width != Format.NO_VALUE);
|
||||
checkArgument(format.height != Format.NO_VALUE);
|
||||
// According to interface Javadoc, format.rotationDegrees should be 0. The video should always
|
||||
// be in landscape orientation.
|
||||
checkArgument(format.height < format.width);
|
||||
checkArgument(format.rotationDegrees == 0);
|
||||
// Checking again to silence null checker warning.
|
||||
checkNotNull(format.sampleMimeType);
|
||||
format = getVideoEncoderSupportedFormat(format);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue