summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorVivia Nikolaidou <vivia@ahiru.eu>2021-02-17 15:15:09 +0200
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-02-17 13:46:41 +0000
commit66bfd0e8aef6c08167c5742e096e5cc96246d984 (patch)
tree3f455861a4fb4993331d145e2c29a1af57c328b6 /gst
parentde83bd6b2f7bb08f79e1c65e92fa6cf98477b4d2 (diff)
downloadgstreamer-plugins-bad-66bfd0e8aef6c08167c5742e096e5cc96246d984.tar.gz
h265parse: Detect height change on field-based interlaced files
The first time update_src_caps is called, there's no frame parsed yet, therefore we don't know whether the file has alternate-field interlacing mode. If we run it again after we have a frame, it might be that now we have the SEI pic_struct parsed, and therefore we know that it's field-based interlaced, and therefore the height must be multiplied by two. Earlier on this was not detected as a change. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2022>
Diffstat (limited to 'gst')
-rw-r--r--gst/videoparsers/gsth265parse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gst/videoparsers/gsth265parse.c b/gst/videoparsers/gsth265parse.c
index 0e6a9a9b5..7f45337f9 100644
--- a/gst/videoparsers/gsth265parse.c
+++ b/gst/videoparsers/gsth265parse.c
@@ -2026,12 +2026,14 @@ gst_h265_parse_update_src_caps (GstH265Parse * h265parse, GstCaps * caps)
crop_width = sps->width;
crop_height = sps->height;
}
+ if (gst_h265_parse_is_field_interlaced (h265parse)) {
+ crop_height *= 2;
+ }
if (G_UNLIKELY (h265parse->width != crop_width ||
h265parse->height != crop_height)) {
h265parse->width = crop_width;
- h265parse->height = gst_h265_parse_is_field_interlaced (h265parse) ?
- crop_height * 2 : crop_height;
+ h265parse->height = crop_height;
GST_INFO_OBJECT (h265parse, "resolution changed %dx%d",
h265parse->width, h265parse->height);
modified = TRUE;