Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--decoder/LAVVideo/LAVVideo.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/decoder/LAVVideo/LAVVideo.cpp b/decoder/LAVVideo/LAVVideo.cpp
index 9bb922d5..8abd20d2 100644
--- a/decoder/LAVVideo/LAVVideo.cpp
+++ b/decoder/LAVVideo/LAVVideo.cpp
@@ -1050,6 +1050,12 @@ receiveconnection:
CMediaType newmt = *pmt;
videoFormatTypeHandler(newmt.Format(), newmt.FormatType(), &pBIH);
DbgLog((LOG_TRACE, 10, L"-> New MediaType negotiated; actual width: %d - renderer requests: %ld", width, pBIH->biWidth));
+ if (pBIH->biWidth < width) {
+ DbgLog((LOG_ERROR, 10, L"-> Renderer requests width smaller than image width, failing.."));
+ DeleteMediaType(pmt);
+ pOut->Release();
+ return E_FAIL;
+ }
// Check image size
DWORD lSampleSize = m_PixFmtConverter.GetImageSize(pBIH->biWidth, abs(pBIH->biHeight));
if (lSampleSize != pBIH->biSizeImage) {