mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 14:06:23 +00:00
h265parse: Fix source caps to report cropped dimensions
https://bugzilla.gnome.org/show_bug.cgi?id=747613
This commit is contained in:
parent
5770a96c8d
commit
6fc55a997e
1 changed files with 18 additions and 3 deletions
|
@ -1329,9 +1329,24 @@ gst_h265_parse_update_src_caps (GstH265Parse * h265parse, GstCaps * caps)
|
|||
if (G_UNLIKELY (!sps)) {
|
||||
caps = gst_caps_copy (sink_caps);
|
||||
} else {
|
||||
h265parse->width = sps->width;
|
||||
h265parse->height = sps->height;
|
||||
modified = TRUE;
|
||||
gint crop_width, crop_height;
|
||||
|
||||
if (sps->conformance_window_flag) {
|
||||
crop_width = sps->crop_rect_width;
|
||||
crop_height = sps->crop_rect_height;
|
||||
} else {
|
||||
crop_width = sps->width;
|
||||
crop_height = sps->height;
|
||||
}
|
||||
|
||||
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;
|
||||
modified = TRUE;
|
||||
}
|
||||
|
||||
/* 0/1 is set as the default in the codec parser */
|
||||
if (sps->vui_params.timing_info_present_flag &&
|
||||
|
|
Loading…
Reference in a new issue