mpegvideoparse: Fix level code

Valid ranges            are from 4 to 10
Valid ranges >> 1       are from 2 to 5
Valid ranges >> 1 - 2   are from 0 to 3

 (and not from 1 to 4)
This commit is contained in:
Edward Hervey 2012-03-02 11:07:47 +01:00
parent 671550714f
commit a274bc5b76

View file

@ -636,7 +636,7 @@ gst_mpegv_parse_update_src_caps (GstMpegvParse * mpvparse)
profile = profiles[profile_c - 1];
if ((level_c > 3) && (level_c < 11) && (level_c % 2 == 0))
level = levels[(level_c >> 1) - 1];
level = levels[(level_c >> 1) - 2];
if (profile_c == 8) {
/* Non-hierarchical profile */
@ -664,6 +664,8 @@ gst_mpegv_parse_update_src_caps (GstMpegvParse * mpvparse)
/* FIXME does it make sense to expose profile/level in the caps ? */
GST_DEBUG_OBJECT (mpvparse, "profile:'%s' level:'%s'", profile, level);
if (profile)
gst_caps_set_simple (caps, "profile", G_TYPE_STRING, profile, NULL);
else