utils: h264: don't use fatal asserts.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Fri, 10 Jan 2014 18:49:52 +0000 (19:49 +0100)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Fri, 10 Jan 2014 18:52:50 +0000 (19:52 +0100)
Replace g_assert() with a g_debug() so that to not make the program
abort when an unsupported value is supplied.

gst-libs/gst/vaapi/gstvaapiutils_h264.c

index 20cc474..8c39437 100644 (file)
@@ -168,7 +168,7 @@ gst_vaapi_utils_h264_get_profile (guint8 profile_idc)
       profile = GST_VAAPI_PROFILE_H264_STEREO_HIGH;
       break;
     default:
-      g_assert (0 && "unsupported profile_idc value");
+      g_debug ("unsupported profile_idc value");
       profile = GST_VAAPI_PROFILE_UNKNOWN;
       break;
   }
@@ -217,7 +217,7 @@ gst_vaapi_utils_h264_get_profile_idc (GstVaapiProfile profile)
       profile_idc = GST_H264_PROFILE_STEREO_HIGH;
       break;
     default:
-      g_assert (0 && "unsupported GstVaapiProfile value");
+      g_debug ("unsupported GstVaapiProfile value");
       profile_idc = 0;
       break;
   }
@@ -257,7 +257,7 @@ gst_vaapi_utils_h264_get_level (guint8 level_idc)
     if (llp->level_idc == level_idc)
       return llp->level;
   }
-  g_assert (0 && "unsupported level_idc value");
+  g_debug ("unsupported level_idc value");
   return (GstVaapiLevelH264) 0;
 }
 
@@ -354,7 +354,7 @@ gst_vaapi_utils_h264_get_chroma_type (guint chroma_format_idc)
       chroma_type = GST_VAAPI_CHROMA_TYPE_YUV444;
       break;
     default:
-      g_assert (0 && "unsupported chroma_format_idc value");
+      g_debug ("unsupported chroma_format_idc value");
       chroma_type = (GstVaapiChromaType) 0;
       break;
   }
@@ -381,7 +381,7 @@ gst_vaapi_utils_h264_get_chroma_format_idc (GstVaapiChromaType chroma_type)
       chroma_format_idc = 3;
       break;
     default:
-      g_assert (0 && "unsupported GstVaapiChromaType value");
+      g_debug ("unsupported GstVaapiChromaType value");
       chroma_format_idc = 1;
       break;
   }