Merge "Fixed 3419090 Throwing exception for unsupported video codec profiles and level" into honeycomb
diff --git a/libvideoeditor/vss/inc/M4VSS3GPP_ErrorCodes.h b/libvideoeditor/vss/inc/M4VSS3GPP_ErrorCodes.h
index 3ad97a7..7f3188a 100755
--- a/libvideoeditor/vss/inc/M4VSS3GPP_ErrorCodes.h
+++ b/libvideoeditor/vss/inc/M4VSS3GPP_ErrorCodes.h
@@ -151,7 +151,9 @@
  * File contains no video stream or an unsupported video stream */
 #define M4VSS3GPP_ERR_EDITING_NO_SUPPORTED_VIDEO_STREAM_IN_FILE    M4OSA_ERR_CREATE( M4_ERR,\
                                                                                 M4VSS3GPP, 0x0026)
-
+/**
+ * Unsupported H264 profile for Video Editing */
+#define M4VSS3GPP_ERR_EDITING_UNSUPPORTED_H264_PROFILE M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0027)
 
 /************************************************************************/
 /* Errors returned by M4VSS3GPP_editCheckClipCompatibility()            */
diff --git a/libvideoeditor/vss/src/M4VSS3GPP_ClipAnalysis.c b/libvideoeditor/vss/src/M4VSS3GPP_ClipAnalysis.c
index 471cb6d..97e3e89 100755
--- a/libvideoeditor/vss/src/M4VSS3GPP_ClipAnalysis.c
+++ b/libvideoeditor/vss/src/M4VSS3GPP_ClipAnalysis.c
@@ -1075,6 +1075,15 @@
                 break;
 
             case M4VIDEOEDITING_kH264:
+                if( M4VIDEOEDITING_kProfile_and_Level_Out_Of_Range
+                    == pClipProperties->ProfileAndLevel )
+                {
+                    M4OSA_TRACE1_0(
+                        "M4VSS3GPP_intCheckClipCompatibleWithVssEditing():\
+                        unsupported H264 profile");
+                    video_err = M4VSS3GPP_ERR_EDITING_UNSUPPORTED_H264_PROFILE;
+                    break;
+                }
 
                 uiNbOfValidStreams++;
                 pClipProperties->bVideoIsEditable = M4OSA_TRUE;