mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
decklinkvideosrc: Fix crash when mode is not specified
In that case, we will get "VideoInputFrameArrived" callback without "VideoInputFormatChanged" Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2218>
This commit is contained in:
parent
4c4f031207
commit
81ac09cfda
1 changed files with 4 additions and 2 deletions
|
@ -991,7 +991,7 @@ public:
|
||||||
GstClockTime stream_time, GstClockTime stream_duration,
|
GstClockTime stream_time, GstClockTime stream_duration,
|
||||||
GstClockTime hardware_time, GstClockTime hardware_duration,
|
GstClockTime hardware_time, GstClockTime hardware_duration,
|
||||||
gboolean no_signal) = NULL;
|
gboolean no_signal) = NULL;
|
||||||
GstDecklinkModeEnum mode;
|
GstDecklinkModeEnum mode = GST_DECKLINK_MODE_AUTO;
|
||||||
GstClockTime capture_time = GST_CLOCK_TIME_NONE;
|
GstClockTime capture_time = GST_CLOCK_TIME_NONE;
|
||||||
GstClockTime base_time = 0;
|
GstClockTime base_time = 0;
|
||||||
gboolean no_signal = FALSE;
|
gboolean no_signal = FALSE;
|
||||||
|
@ -1009,7 +1009,9 @@ public:
|
||||||
base_time = gst_element_get_base_time (videosrc);
|
base_time = gst_element_get_base_time (videosrc);
|
||||||
got_video_frame = m_input->got_video_frame;
|
got_video_frame = m_input->got_video_frame;
|
||||||
}
|
}
|
||||||
mode = gst_decklink_get_mode_enum_from_bmd (m_input->mode->mode);
|
|
||||||
|
if (m_input->mode)
|
||||||
|
mode = gst_decklink_get_mode_enum_from_bmd (m_input->mode->mode);
|
||||||
|
|
||||||
if (m_input->audiosrc) {
|
if (m_input->audiosrc) {
|
||||||
audiosrc = GST_ELEMENT_CAST (gst_object_ref (m_input->audiosrc));
|
audiosrc = GST_ELEMENT_CAST (gst_object_ref (m_input->audiosrc));
|
||||||
|
|
Loading…
Reference in a new issue