diff options
author | Sreerenj Balachandran <sreerenj.balachandran@intel.com> | 2015-04-30 19:08:25 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-04-30 21:49:56 +0200 |
commit | 6fc55a997e57d8a4547b58680b390a8f1394a2b8 (patch) | |
tree | a6b6ad8d61a32e60f0fc2358ddb04edadb3e3283 /gst | |
parent | 5770a96c8d43fd744a348f869746b26ac648afa3 (diff) |
h265parse: Fix source caps to report cropped dimensions
https://bugzilla.gnome.org/show_bug.cgi?id=747613
Diffstat (limited to 'gst')
-rw-r--r-- | gst/videoparsers/gsth265parse.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/gst/videoparsers/gsth265parse.c b/gst/videoparsers/gsth265parse.c index 01546d9b7..86f4f7a9c 100644 --- a/gst/videoparsers/gsth265parse.c +++ b/gst/videoparsers/gsth265parse.c @@ -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 && |