mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
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:
parent
671550714f
commit
a274bc5b76
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue