Qt: Work around Qt DirectShow bug (fixes #829)

This commit is contained in:
Vicki Pfau 2017-07-28 18:30:15 -07:00
parent 3927fcfbd3
commit 4681a823b7
1 changed files with 5 additions and 0 deletions

View File

@ -37,7 +37,12 @@ bool VideoDumper::present(const QVideoFrame& frame) {
if (swap) { if (swap) {
image = image.rgbSwapped(); image = image.rgbSwapped();
} else { } else {
#ifdef Q_OS_WIN
// Qt's DirectShow plug-in is pretty dang buggy
image = image.mirrored(true);
#else
image = image.copy(); // Create a deep copy of the bits image = image.copy(); // Create a deep copy of the bits
#endif
} }
mappedFrame.unmap(); mappedFrame.unmap();
emit imageAvailable(image); emit imageAvailable(image);