videoencoder: copy over the field order for more interlace modes

.. when copying over video info things from the input state
to the output state.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8219>
This commit is contained in:
Tim-Philipp Müller 2024-12-27 20:33:22 +01:00 committed by GStreamer Marge Bot
parent 661c31f0bf
commit a62e517f6d

View File

@ -1869,7 +1869,9 @@ gst_video_encoder_negotiate_default (GstVideoEncoder * encoder)
gst_caps_set_simple (state->caps, "interlace-mode", G_TYPE_STRING, gst_caps_set_simple (state->caps, "interlace-mode", G_TYPE_STRING,
gst_video_interlace_mode_to_string (info->interlace_mode), NULL); gst_video_interlace_mode_to_string (info->interlace_mode), NULL);
if (info->interlace_mode == GST_VIDEO_INTERLACE_MODE_INTERLEAVED && if ((info->interlace_mode == GST_VIDEO_INTERLACE_MODE_INTERLEAVED ||
info->interlace_mode == GST_VIDEO_INTERLACE_MODE_FIELDS ||
info->interlace_mode == GST_VIDEO_INTERLACE_MODE_ALTERNATE) &&
GST_VIDEO_INFO_FIELD_ORDER (info) != GST_VIDEO_FIELD_ORDER_UNKNOWN) GST_VIDEO_INFO_FIELD_ORDER (info) != GST_VIDEO_FIELD_ORDER_UNKNOWN)
gst_caps_set_simple (state->caps, "field-order", G_TYPE_STRING, gst_caps_set_simple (state->caps, "field-order", G_TYPE_STRING,
gst_video_field_order_to_string (GST_VIDEO_INFO_FIELD_ORDER (info)), gst_video_field_order_to_string (GST_VIDEO_INFO_FIELD_ORDER (info)),