mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 21:48:55 +00:00
d3d11decoder: Fix crash on negotiate() when decoder is not configured
The negotiate() can be called by GstVideoDecoder baseclass on GAP event, and decoder helper object might not be configured at the time when negotiate() is called. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5394>
This commit is contained in:
parent
0e6cd64232
commit
a7353d8859
1 changed files with 5 additions and 0 deletions
|
@ -1661,6 +1661,11 @@ gst_d3d11_decoder_negotiate (GstD3D11Decoder * decoder,
|
|||
info = &decoder->output_info;
|
||||
input_state = decoder->input_state;
|
||||
|
||||
if (!decoder->configured) {
|
||||
GST_WARNING_OBJECT (videodec, "Decoder is not configured");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
alternate_interlaced =
|
||||
(GST_VIDEO_INFO_INTERLACE_MODE (info) ==
|
||||
GST_VIDEO_INTERLACE_MODE_ALTERNATE);
|
||||
|
|
Loading…
Reference in a new issue