From 197dcb9bf4d8fa9218b2b85e5e9f08866bf44708 Mon Sep 17 00:00:00 2001 From: Marco Felsch Date: Mon, 19 Nov 2018 17:19:33 +0100 Subject: [PATCH] video-info: parse field-order for all interleaved formats The "field-order" is related for all interlace_mode modes except the "progressive" mode. So instead of or'ing each mode we can use the already supported GST_VIDEO_INFO_IS_INTERLACED macro. --- gst-libs/gst/video/video-info.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gst-libs/gst/video/video-info.c b/gst-libs/gst/video/video-info.c index 203110533b..dcffe194c0 100644 --- a/gst-libs/gst/video/video-info.c +++ b/gst-libs/gst/video/video-info.c @@ -479,8 +479,7 @@ gst_video_info_from_caps (GstVideoInfo * info, const GstCaps * caps) goto alternate_no_feature; } - if ((info->interlace_mode == GST_VIDEO_INTERLACE_MODE_INTERLEAVED || - info->interlace_mode == GST_VIDEO_INTERLACE_MODE_ALTERNATE) && + if (GST_VIDEO_INFO_IS_INTERLACED (info) && (s = gst_structure_get_string (structure, "field-order"))) { GST_VIDEO_INFO_FIELD_ORDER (info) = gst_video_field_order_from_string (s); } else {