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:
authorHendrik Leppkes <h.leppkes@gmail.com>2017-08-11 01:07:03 +0300
committerHendrik Leppkes <h.leppkes@gmail.com>2017-08-11 01:10:16 +0300
commitc158ca6b67e257047dbafe141498926eeb025d70 (patch)
tree5b40e6799ea04c6ad647d3d7717a2cf18a456779 /decoder/LAVVideo
parentab8192d899d47859b059c62ed56abdf71bfb7fbc (diff)
Protect against memory allocation of media samples failing
Diffstat (limited to 'decoder/LAVVideo')
-rw-r--r--decoder/LAVVideo/LAVVideo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/decoder/LAVVideo/LAVVideo.cpp b/decoder/LAVVideo/LAVVideo.cpp
index e951dc92..b905a765 100644
--- a/decoder/LAVVideo/LAVVideo.cpp
+++ b/decoder/LAVVideo/LAVVideo.cpp
@@ -1768,7 +1768,8 @@ HRESULT CLAVVideo::DeliverToRenderer(LAVFrame *pFrame)
ReconnectOutput(width, height, pFrame->aspect_ratio, pFrame->ext_format, avgDuration, TRUE);
} else {
- if(FAILED(hr = GetDeliveryBuffer(&pSampleOut, width, height, pFrame->aspect_ratio, pFrame->ext_format, avgDuration)) || FAILED(hr = pSampleOut->GetPointer(&pDataOut))) {
+ if(FAILED(hr = GetDeliveryBuffer(&pSampleOut, width, height, pFrame->aspect_ratio, pFrame->ext_format, avgDuration)) || FAILED(hr = pSampleOut->GetPointer(&pDataOut)) || pDataOut == nullptr) {
+ SafeRelease(&pSampleOut);
ReleaseFrame(&pFrame);
return hr;
}