Commit 8abff201 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠 Committed by Sebastian Dröge

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
parent dedb9432
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment