]> git.sesse.net Git - nageru/blobdiff - nageru/decklink_capture.cpp
Collapse all the 10-bit flags.
[nageru] / nageru / decklink_capture.cpp
index eefb537cd1b3409d9f51593b1432e9360ff534b4..722221ea21f3f68a2e1179c958a093188e94cd18 100644 (file)
@@ -246,7 +246,7 @@ HRESULT STDMETHODCALLTYPE DeckLinkCapture::VideoInputFrameArrived(
                const int stride = video_frame->GetRowBytes();
                const BMDPixelFormat format = video_frame->GetPixelFormat();
                assert(format == pixel_format_to_bmd(current_pixel_format));
-               if (global_flags.ten_bit_input) {
+               if (global_flags.bit_depth > 8) {
                        assert(stride == int(v210Converter::get_v210_stride(width)));
                } else {
                        assert(stride == width * 2);
@@ -350,14 +350,12 @@ void DeckLinkCapture::stop_dequeue_thread()
                fprintf(stderr, "StopStreams failed with error 0x%x\n", result);
                abort();
        }
-       if (input->DisableVideoInput() != S_OK) {
-               fprintf(stderr, "Failed to disable video input for card %d\n", card_index);
-               exit(1);
-       }
-       if (input->DisableAudioInput() != S_OK) {
-               fprintf(stderr, "Failed to disable audio input for card %d\n", card_index);
-               exit(1);
-       }
+
+       // We could call DisableVideoInput() and DisableAudioInput() here,
+       // but they seem to be taking a really long time, and we only do this
+       // during shutdown anyway (except when switching to output mode,
+       // where DeckLinkOutput does the disabling), so StopStreams() will suffice.
+
        running = false;
 }