Fixed 3419090 Throwing exception for unsupported video codec profiles and level

Change-Id: I89e8723a6b89338ecedcfabf8b0c63ed2f7e9468
This commit is contained in:
Danny Fernandes
2011-02-04 01:33:49 -08:00
parent 160c18a4d2
commit 7b3f26328b
2 changed files with 10 additions and 0 deletions

View File

@@ -197,6 +197,11 @@ public class MediaProperties {
public static final int FILE_M4V = 10;
public static final int FILE_UNSUPPORTED = 255;
/**
* Undefined video codec profiles
*/
public static final int UNDEFINED_VIDEO_PROFILE = 255;
/**
* The array of the supported file formats
*/

View File

@@ -139,6 +139,11 @@ public class MediaVideoItem extends MediaItem {
throw new IllegalArgumentException("Unsupported Video Codec Format in Input File");
}
/* Check if the profile is unsupported. */
if (properties.profileAndLevel == MediaProperties.UNDEFINED_VIDEO_PROFILE) {
throw new IllegalArgumentException("Unsupported Video Codec Profile in Input File");
}
mWidth = properties.width;
mHeight = properties.height;
mAspectRatio = mMANativeHelper.getAspectRatio(properties.width,