]> git.sesse.net Git - nageru/blobdiff - ffmpeg_capture.h
Fix an issue where RGBA videos would flicker.
[nageru] / ffmpeg_capture.h
index 095078267c1987d67e7e843ded7e90cb57641136..9753c0032f37ae184a91786335bb04534be9413c 100644 (file)
@@ -17,8 +17,7 @@
 // CPU conversion), but it would require some more plumbing, and it would also
 // fail if the file changes parameters midway, which is allowed in some formats.
 //
-// There is currently no audio support. There is also no support for changing
-// the video underway (unlike images), although there really should be.
+// There is currently no audio support.
 
 #include <assert.h>
 #include <stdint.h>
@@ -118,13 +117,13 @@ public:
        uint32_t get_current_video_mode() const override { return 0; }
 
        std::set<bmusb::PixelFormat> get_available_pixel_formats() const override {
-               return std::set<bmusb::PixelFormat>{ bmusb::PixelFormat_8BitRGBA };
+               return std::set<bmusb::PixelFormat>{ bmusb::PixelFormat_8BitBGRA };
        }
        void set_pixel_format(bmusb::PixelFormat pixel_format) override {
-               assert(pixel_format == bmusb::PixelFormat_8BitRGBA);
+               assert(pixel_format == bmusb::PixelFormat_8BitBGRA);
        }       
        bmusb::PixelFormat get_current_pixel_format() const override {
-               return bmusb::PixelFormat_8BitRGBA;
+               return bmusb::PixelFormat_8BitBGRA;
        }
 
        std::map<uint32_t, std::string> get_available_video_inputs() const override {