diff options
-rw-r--r-- | sys/decklink/gstdecklink.cpp | 7 |
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); } |