videodecoder: Forward hdr-format info downstream

By default the hdr-format detected by a parser should
be passed to the downstream element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/650>
This commit is contained in:
Stéphane Cerveau 2020-07-03 12:06:14 +02:00 committed by GStreamer Merge Bot
parent 631489de23
commit 9b852181d8

View file

@ -4155,6 +4155,14 @@ gst_video_decoder_negotiate_default (GstVideoDecoder * decoder)
"content-light-level", G_TYPE_STRING, s, NULL);
}
}
if (gst_structure_has_field (in_struct, "hdr-format")) {
const gchar *s;
state->caps = gst_caps_make_writable (state->caps);
if ((s = gst_structure_get_string (in_struct, "hdr-format"))) {
gst_caps_set_simple (state->caps, "hdr-format", G_TYPE_STRING, s, NULL);
}
}
gst_caps_unref (incaps);
}