summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2015-08-08 15:17:54 +0100
committerTim-Philipp Müller <tim@centricular.com>2016-04-06 14:35:27 +0100
commitcecb4e3af161e629ae43ad1e6c34579c0da65281 (patch)
tree0a425e2771cc8719fa2d7933784d16e693e02063
parentfc34266aef823293890b07cf00fb9dac3f4bf9db (diff)
downloadgstreamer-plugins-bad-cecb4e3af161e629ae43ad1e6c34579c0da65281.tar.gz
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
-rw-r--r--sys/decklink/gstdecklink.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/decklink/gstdecklink.cpp b/sys/decklink/gstdecklink.cpp
index eb39bdb46..8a2f10144 100644
--- a/sys/decklink/gstdecklink.cpp
+++ b/sys/decklink/gstdecklink.cpp
@@ -484,6 +484,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);
@@ -522,7 +525,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);
}