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.
This commit is contained in:
Marco Felsch 2018-11-19 17:19:33 +01:00 committed by Sebastian Dröge
parent 6d0f796591
commit 197dcb9bf4

View file

@ -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 {