Commit 392f86ae authored by Dongil Park's avatar Dongil Park Committed by Nicolas Dufresne

h265parse: Update framerate when we found vps_timing_info

The timing_info was described at vps or vui parameter.
So we can update the framerate field of GstCaps when we could
parse vps_timing_info parameters.
parent 1af22f35
Pipeline #42575 failed with stages
in 144 minutes and 32 seconds
......@@ -1725,6 +1725,7 @@ ensure_caps_profile (GstH265Parse * h265parse, GstCaps * caps, GstH265SPS * sps)
static void
gst_h265_parse_update_src_caps (GstH265Parse * h265parse, GstCaps * caps)
{
GstH265VPS *vps;
GstH265SPS *sps;
GstCaps *sink_caps, *src_caps;
gboolean modified = FALSE;
......@@ -1752,6 +1753,8 @@ gst_h265_parse_update_src_caps (GstH265Parse * h265parse, GstCaps * caps)
sps = h265parse->nalparser->last_sps;
GST_DEBUG_OBJECT (h265parse, "sps: %p", sps);
vps = sps->vps;
GST_DEBUG_OBJECT (h265parse, "vps: %p", vps);
/* only codec-data for nice-and-clean au aligned packetized hevc format */
if ((h265parse->format == GST_H265_PARSE_FORMAT_HVC1
......@@ -1800,7 +1803,8 @@ gst_h265_parse_update_src_caps (GstH265Parse * h265parse, GstCaps * caps)
}
/* 0/1 is set as the default in the codec parser */
if (sps->vui_params.timing_info_present_flag &&
if ((sps->vui_params.timing_info_present_flag ||
(vps && vps->timing_info_present_flag)) &&
!(sps->fps_num == 0 && sps->fps_den == 1)) {
if (G_UNLIKELY (h265parse->fps_num != sps->fps_num
|| h265parse->fps_den != sps->fps_den)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment