mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-17 22:06:41 +00:00
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.
This commit is contained in:
parent
1af22f3561
commit
392f86ae35
1 changed files with 5 additions and 1 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue