codec-utils: H264 level idc 0 is not valid

Don't put level=0 into the caps, it confuses other elements.

https://bugzilla.gnome.org/show_bug.cgi?id=765538
This commit is contained in:
Sebastian Dröge 2016-04-25 16:47:00 +03:00
parent fc99a61774
commit 7741e56db4

View file

@ -591,7 +591,9 @@ gst_codec_utils_h264_get_level (const guint8 * sps, guint len)
csf3 = (sps[1] & 0x10) >> 4;
if ((sps[2] == 11 && csf3) || sps[2] == 9)
if (sps[2] == 0)
return NULL;
else if ((sps[2] == 11 && csf3) || sps[2] == 9)
return "1b";
else if (sps[2] % 10 == 0)
return digit_to_string (sps[2] / 10);