summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSreerenj Balachandran <sreerenj.balachandran@intel.com>2015-04-10 15:24:28 +0300
committerSebastian Dröge <sebastian@centricular.com>2015-04-30 21:42:34 +0200
commit6af56187e8a793c593ed81d338001f32e6cdcc13 (patch)
tree1af968ed456ea35b4bd523777efa6556959886b6
parent955dc5258fa78e9637def7c765ce7cd08813636b (diff)
pbutils: Use more strict profile checking for hevc
Use the profile_idc value to set the profile string in caps. Don't use compatibility flags for this purpose. https://bugzilla.gnome.org/show_bug.cgi?id=747613
-rw-r--r--gst-libs/gst/pbutils/codec-utils.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/gst-libs/gst/pbutils/codec-utils.c b/gst-libs/gst/pbutils/codec-utils.c
index 596497586..7aadecb17 100644
--- a/gst-libs/gst/pbutils/codec-utils.c
+++ b/gst-libs/gst/pbutils/codec-utils.c
@@ -682,7 +682,6 @@ const gchar *
gst_codec_utils_h265_get_profile (const guint8 * profile_tier_level, guint len)
{
const gchar *profile = NULL;
- gint gpcf1 = 0, gpcf2 = 0, gpcf3 = 0;
gint profile_idc;
g_return_val_if_fail (profile_tier_level != NULL, NULL);
@@ -694,15 +693,11 @@ gst_codec_utils_h265_get_profile (const guint8 * profile_tier_level, guint len)
profile_idc = (profile_tier_level[0] & 0x1f);
- gpcf1 = (profile_tier_level[1] & 0x40) >> 6;
- gpcf2 = (profile_tier_level[1] & 0x20) >> 5;
- gpcf3 = (profile_tier_level[1] & 0x10) >> 4;
-
- if (profile_idc == 1 || gpcf1)
+ if (profile_idc == 1)
profile = "main";
- else if (profile_idc == 2 || gpcf2)
+ else if (profile_idc == 2)
profile = "main-10";
- else if (profile_idc == 3 || gpcf3)
+ else if (profile_idc == 3)
profile = "main-still-picture";
else
profile = NULL;