From 862d8ccf3a3d48602427eb2bfb319b2fc7181fe0 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 28 Feb 2016 18:47:00 +0100 Subject: [PATCH] Never send in a frame rate of 0/0. --- bmusb.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bmusb.cpp b/bmusb.cpp index aa5b932..3e31c01 100644 --- a/bmusb.cpp +++ b/bmusb.cpp @@ -188,8 +188,14 @@ void BMUSBCapture::dequeue_thread_func() pending_audio_frames.pop_front(); lock.unlock(); audio_format.id = audio_frame.format; + + // Use the video format of the pending frame. + QueuedFrame video_frame = pending_video_frames.front(); + VideoFormat video_format; + decode_video_format(video_frame.format, &video_format); + frame_callback(audio_timecode, - FrameAllocator::Frame(), 0, VideoFormat(), + FrameAllocator::Frame(), 0, video_format, audio_frame.frame, AUDIO_HEADER_SIZE, audio_format); } else { QueuedFrame video_frame = pending_video_frames.front(); -- 2.39.2