if (G_UNLIKELY (h265parse->width != crop_width ||
h265parse->height != crop_height)) {
- GST_INFO_OBJECT (h265parse, "resolution changed %dx%d",
- crop_width, crop_height);
h265parse->width = crop_width;
- h265parse->height = crop_height;
+ h265parse->height = sps->profile_tier_level.interlaced_source_flag ?
+ crop_height * 2 : crop_height;
+ GST_INFO_OBJECT (h265parse, "resolution changed %dx%d",
+ h265parse->width, h265parse->height);
modified = TRUE;
}
/* but not necessarily or reliably this */
if (fps_num > 0 && fps_den > 0) {
GstStructure *s2;
+ GstClockTime val;
+
GST_INFO_OBJECT (h265parse, "setting framerate in caps");
gst_caps_set_simple (caps, "framerate",
GST_TYPE_FRACTION, fps_num, fps_den, NULL);
&h265parse->parsed_fps_d);
gst_base_parse_set_frame_rate (GST_BASE_PARSE (h265parse),
fps_num, fps_den, 0, 0);
- latency = gst_util_uint64_scale (GST_SECOND, fps_den, fps_num);
+ val = sps->profile_tier_level.interlaced_source_flag ? GST_SECOND / 2 :
+ GST_SECOND;
+ latency = gst_util_uint64_scale (val, fps_den, fps_num);
gst_base_parse_set_latency (GST_BASE_PARSE (h265parse), latency,
latency);
}
if (profile != NULL)
gst_caps_set_simple (caps, "profile", G_TYPE_STRING, profile, NULL);
+ if (sps->profile_tier_level.interlaced_source_flag)
+ gst_caps_set_simple (caps, "interlace-mode", G_TYPE_STRING, "alternate",
+ NULL);
+
tier = get_tier_string (sps->profile_tier_level.tier_flag);
if (tier != NULL)
gst_caps_set_simple (caps, "tier", G_TYPE_STRING, tier, NULL);