am 0e8dc72d
: Merge "Fix for issue 3453519: (Java/JNI) do not allow editing of DRM protected contents" into honeycomb-mr1
* commit '0e8dc72db34c0a4eb92763de4e048abc4d20f47f': Fix for issue 3453519: (Java/JNI) do not allow editing of DRM protected contents
This commit is contained in:
@ -140,7 +140,7 @@ public class AudioTrack {
|
||||
try {
|
||||
properties = mMANativeHelper.getMediaProperties(filename);
|
||||
} catch (Exception e) {
|
||||
throw new IllegalArgumentException("Unsupported file or file not found");
|
||||
throw new IllegalArgumentException(e.getMessage() + " : " + filename);
|
||||
}
|
||||
switch (mMANativeHelper.getFileType(properties.fileType)) {
|
||||
case MediaProperties.FILE_3GP:
|
||||
|
@ -115,7 +115,7 @@ public class MediaVideoItem extends MediaItem {
|
||||
try {
|
||||
properties = mMANativeHelper.getMediaProperties(filename);
|
||||
} catch ( Exception e) {
|
||||
throw new IllegalArgumentException("Unsupported file or file not found: " + filename);
|
||||
throw new IllegalArgumentException(e.getMessage() + " : " + filename);
|
||||
}
|
||||
|
||||
switch (mMANativeHelper.getFileType(properties.fileType)) {
|
||||
|
@ -207,6 +207,7 @@ static const VideoEdit_Osal_Result gkRESULTS[] =
|
||||
VIDEOEDIT_OSAL_RESULT_INIT(M4MCS_ERR_AUDIOBITRATE_TOO_HIGH ),
|
||||
VIDEOEDIT_OSAL_RESULT_INIT(M4MCS_ERR_OUTPUT_FILE_SIZE_TOO_SMALL ),
|
||||
VIDEOEDIT_OSAL_RESULT_INIT(M4MCS_ERR_NOMORE_SPACE ),
|
||||
VIDEOEDIT_OSAL_RESULT_INIT(M4MCS_ERR_FILE_DRM_PROTECTED ),
|
||||
|
||||
// M4READER_Common.h
|
||||
VIDEOEDIT_OSAL_RESULT_INIT(M4ERR_READER_UNKNOWN_STREAM_TYPE ),
|
||||
|
@ -204,10 +204,17 @@ jobject videoEditProp_getProperties(
|
||||
result = getClipProperties(
|
||||
pEnv, thiz, pFile, clipType, pClipProperties);
|
||||
|
||||
if (M4MCS_ERR_FILE_DRM_PROTECTED == result) {
|
||||
// Check if the creation succeeded.
|
||||
videoEditJava_checkAndThrowIllegalArgumentException(
|
||||
&gotten, pEnv,(M4NO_ERROR != result),
|
||||
"Invalid File or File not found");
|
||||
"Invalid File - DRM Protected ");
|
||||
} else {
|
||||
// Check if the creation succeeded.
|
||||
videoEditJava_checkAndThrowIllegalArgumentException(
|
||||
&gotten, pEnv,(M4NO_ERROR != result),
|
||||
"Invalid File or File not found ");
|
||||
}
|
||||
|
||||
/**
|
||||
* Max resolution supported is 1280 x 720.
|
||||
|
Reference in New Issue
Block a user