]> git.sesse.net Git - nageru/blobdiff - mixer.cpp
Expose choosing video pixel format to Lua.
[nageru] / mixer.cpp
index 857d62bf4fc2ab5367ba2bf1f3332fa2728fc616..421efea9f13a096a16b8460ae42152ead88fa164 100644 (file)
--- a/mixer.cpp
+++ b/mixer.cpp
@@ -427,7 +427,7 @@ void Mixer::configure_card(unsigned card_index, CaptureInterface *capture, CardT
 
        PixelFormat pixel_format;
        if (card_type == CardType::FFMPEG_INPUT) {
-               pixel_format = PixelFormat_8BitBGRA;
+               pixel_format = capture->get_current_pixel_format();
        } else if (global_flags.ten_bit_input) {
                pixel_format = PixelFormat_10BitYCbCr;
        } else {
@@ -643,6 +643,7 @@ void Mixer::bm_frame(unsigned card_index, uint16_t timecode,
                // a deinterlacer to actually get this right.
                assert(video_format.height % 2 == 0);
                video_format.height /= 2;
+               cbcr_height /= 2;
                assert(frame_length % 2 == 0);
                frame_length /= 2;
                num_fields = 2;