From: Steinar H. Gunderson Date: Sun, 28 Feb 2016 17:47:00 +0000 (+0100) Subject: Never send in a frame rate of 0/0. X-Git-Tag: 0.4~18 X-Git-Url: https://git.sesse.net/?p=bmusb;a=commitdiff_plain;h=862d8ccf3a3d48602427eb2bfb319b2fc7181fe0 Never send in a frame rate of 0/0. --- 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();