mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
d3d11decoder: Copy HDR10 related caps field manually
If negotiate() is called from the set_format() chain, sinkpad may not hold caps yet, so baseclass cannot copy it over to srcpad caps. Copy them manually. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2203>
This commit is contained in:
parent
86cf307a6c
commit
b5a8bef5a7
1 changed files with 15 additions and 0 deletions
|
@ -1452,6 +1452,8 @@ gst_d3d11_decoder_negotiate (GstD3D11Decoder * decoder,
|
|||
gboolean alternate_supported = FALSE;
|
||||
gboolean d3d11_supported = FALSE;
|
||||
GstVideoCodecState *input_state;
|
||||
GstStructure *s;
|
||||
const gchar *str;
|
||||
|
||||
g_return_val_if_fail (GST_IS_D3D11_DECODER (decoder), FALSE);
|
||||
g_return_val_if_fail (GST_IS_VIDEO_DECODER (videodec), FALSE);
|
||||
|
@ -1543,6 +1545,19 @@ gst_d3d11_decoder_negotiate (GstD3D11Decoder * decoder,
|
|||
|
||||
state->caps = gst_video_info_to_caps (&state->info);
|
||||
|
||||
s = gst_caps_get_structure (input_state->caps, 0);
|
||||
str = gst_structure_get_string (s, "mastering-display-info");
|
||||
if (str) {
|
||||
gst_caps_set_simple (state->caps,
|
||||
"mastering-display-info", G_TYPE_STRING, str, nullptr);
|
||||
}
|
||||
|
||||
str = gst_structure_get_string (s, "content-light-level");
|
||||
if (str) {
|
||||
gst_caps_set_simple (state->caps,
|
||||
"content-light-level", G_TYPE_STRING, str, nullptr);
|
||||
}
|
||||
|
||||
g_clear_pointer (&decoder->output_state, gst_video_codec_state_unref);
|
||||
decoder->output_state = state;
|
||||
|
||||
|
|
Loading…
Reference in a new issue