From 9b852181d8a1fa2fb1bf3ba898c6ffa04eea3fd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Fri, 3 Jul 2020 12:06:14 +0200 Subject: [PATCH] videodecoder: Forward hdr-format info downstream By default the hdr-format detected by a parser should be passed to the downstream element. Part-of: --- gst-libs/gst/video/gstvideodecoder.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c index bd6cb76694..f5aa41203f 100644 --- a/gst-libs/gst/video/gstvideodecoder.c +++ b/gst-libs/gst/video/gstvideodecoder.c @@ -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); }