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
@ -535,6 +535,9 @@ public:
|
|||||||
BMDTimeValue capture_time, capture_duration;
|
BMDTimeValue capture_time, capture_duration;
|
||||||
HRESULT res;
|
HRESULT res;
|
||||||
|
|
||||||
|
if (video_frame == NULL)
|
||||||
|
goto no_video_frame;
|
||||||
|
|
||||||
res =
|
res =
|
||||||
video_frame->GetHardwareReferenceTimestamp (GST_SECOND, &capture_time,
|
video_frame->GetHardwareReferenceTimestamp (GST_SECOND, &capture_time,
|
||||||
&capture_duration);
|
&capture_duration);
|
||||||
@ -573,7 +576,9 @@ public:
|
|||||||
capture_duration);
|
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);
|
m_input->got_audio_packet (audiosrc, audio_packet, capture_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user