diff options
Diffstat (limited to 'src/plugins/common/evr')
-rw-r--r-- | src/plugins/common/evr/evrcustompresenter.cpp | 24 | ||||
-rw-r--r-- | src/plugins/common/evr/evrhelpers.cpp | 8 |
2 files changed, 15 insertions, 17 deletions
diff --git a/src/plugins/common/evr/evrcustompresenter.cpp b/src/plugins/common/evr/evrcustompresenter.cpp index 7a8985301..5ebde2dda 100644 --- a/src/plugins/common/evr/evrcustompresenter.cpp +++ b/src/plugins/common/evr/evrcustompresenter.cpp @@ -1582,12 +1582,10 @@ HRESULT EVRCustomPresenter::processOutput() // Try to get a free sample from the video sample pool. hr = m_samplePool.getSample(&sample); - if (hr == MF_E_SAMPLEALLOCATOR_EMPTY) { - // No free samples. Try again when a sample is released. + if (hr == MF_E_SAMPLEALLOCATOR_EMPTY) // No free samples. Try again when a sample is released. return S_FALSE; - } else if (FAILED(hr)) { + if (FAILED(hr)) return hr; - } // From now on, we have a valid video sample pointer, where the mixer will // write the video data. @@ -2020,23 +2018,23 @@ static QVideoFrame::PixelFormat pixelFormatFromMediaType(IMFMediaType *type) if (subtype == MFVideoFormat_RGB32) return QVideoFrame::Format_RGB32; - else if (subtype == MFVideoFormat_ARGB32) + if (subtype == MFVideoFormat_ARGB32) return QVideoFrame::Format_ARGB32; - else if (subtype == MFVideoFormat_RGB24) + if (subtype == MFVideoFormat_RGB24) return QVideoFrame::Format_RGB24; - else if (subtype == MFVideoFormat_RGB565) + if (subtype == MFVideoFormat_RGB565) return QVideoFrame::Format_RGB565; - else if (subtype == MFVideoFormat_RGB555) + if (subtype == MFVideoFormat_RGB555) return QVideoFrame::Format_RGB555; - else if (subtype == MFVideoFormat_AYUV) + if (subtype == MFVideoFormat_AYUV) return QVideoFrame::Format_AYUV444; - else if (subtype == MFVideoFormat_I420) + if (subtype == MFVideoFormat_I420) return QVideoFrame::Format_YUV420P; - else if (subtype == MFVideoFormat_UYVY) + if (subtype == MFVideoFormat_UYVY) return QVideoFrame::Format_UYVY; - else if (subtype == MFVideoFormat_YV12) + if (subtype == MFVideoFormat_YV12) return QVideoFrame::Format_YV12; - else if (subtype == MFVideoFormat_NV12) + if (subtype == MFVideoFormat_NV12) return QVideoFrame::Format_NV12; return QVideoFrame::Format_Invalid; diff --git a/src/plugins/common/evr/evrhelpers.cpp b/src/plugins/common/evr/evrhelpers.cpp index 96b61e2eb..a315f1a73 100644 --- a/src/plugins/common/evr/evrhelpers.cpp +++ b/src/plugins/common/evr/evrhelpers.cpp @@ -69,7 +69,7 @@ bool qt_evr_areMediaTypesEqual(IMFMediaType *type1, IMFMediaType *type2) { if (!type1 && !type2) return true; - else if (!type1 || !type2) + if (!type1 || !type2) return false; DWORD dwFlags = 0; @@ -84,10 +84,10 @@ HRESULT qt_evr_validateVideoArea(const MFVideoArea& area, UINT32 width, UINT32 h float fOffsetY = qt_evr_MFOffsetToFloat(area.OffsetY); if ( ((LONG)fOffsetX + area.Area.cx > (LONG)width) || - ((LONG)fOffsetY + area.Area.cy > (LONG)height) ) + ((LONG)fOffsetY + area.Area.cy > (LONG)height) ) { return MF_E_INVALIDMEDIATYPE; - else - return S_OK; + } + return S_OK; } bool qt_evr_isSampleTimePassed(IMFClock *clock, IMFSample *sample) |