mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
decklinkvideosrc: don't crash if we get NULL video frames in the callback
For some reason we seem to sometimes get NULL video_frames in the ::VideoInputFrameArrived() callback, observed on Intensity Pro cards. https://bugzilla.gnome.org/show_bug.cgi?id=747633
This commit is contained in:
parent
dedb94323c
commit
8abff20185
1 changed files with 6 additions and 1 deletions
|
@ -535,6 +535,9 @@ public:
|
|||
BMDTimeValue capture_time, capture_duration;
|
||||
HRESULT res;
|
||||
|
||||
if (video_frame == NULL)
|
||||
goto no_video_frame;
|
||||
|
||||
res =
|
||||
video_frame->GetHardwareReferenceTimestamp (GST_SECOND, &capture_time,
|
||||
&capture_duration);
|
||||
|
@ -573,7 +576,9 @@ public:
|
|||
capture_duration);
|
||||
}
|
||||
|
||||
if (got_audio_packet && audiosrc) {
|
||||
no_video_frame:
|
||||
|
||||
if (audio_packet && got_audio_packet && audiosrc) {
|
||||
m_input->got_audio_packet (audiosrc, audio_packet, capture_time);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue