]> git.sesse.net Git - bmusb/commitdiff
Never send in a frame rate of 0/0.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 28 Feb 2016 17:47:00 +0000 (18:47 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 28 Feb 2016 17:47:00 +0000 (18:47 +0100)
bmusb.cpp

index aa5b93283e66ca4b2ec9453d1775a154438d809d..3e31c01a771a1cbdd62471ee1f86fbd81b32338c 100644 (file)
--- 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;
                        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,
                        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();
                                       audio_frame.frame, AUDIO_HEADER_SIZE, audio_format);
                } else {
                        QueuedFrame video_frame = pending_video_frames.front();