codec-utils: H265 level idc 0 is not valid
authorSebastian Dröge <sebastian@centricular.com>
Mon, 25 Apr 2016 13:48:36 +0000 (16:48 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 25 Apr 2016 13:49:20 +0000 (16:49 +0300)
Don't put level=0 into the caps, it confuses other elements.

https://bugzilla.gnome.org/show_bug.cgi?id=765538

gst-libs/gst/pbutils/codec-utils.c

index 6eff83a..1fe2dc1 100644 (file)
@@ -835,7 +835,9 @@ gst_codec_utils_h265_get_level (const guint8 * profile_tier_level, guint len)
 
   GST_MEMDUMP ("ProfileTierLevel", profile_tier_level, len);
 
-  if (profile_tier_level[11] % 30 == 0)
+  if (profile_tier_level[11] == 0)
+    return NULL;
+  else if (profile_tier_level[11] % 30 == 0)
     return digit_to_string (profile_tier_level[11] / 30);
   else {
     switch (profile_tier_level[11]) {