From: Rémi Bernon rbernon@codeweavers.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45988 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47084 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49715 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52183 Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/winegstreamer/h264_decoder.c | 8 +++++--- dlls/winegstreamer/wma_decoder.c | 16 +++++++++++----- 2 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/dlls/winegstreamer/h264_decoder.c b/dlls/winegstreamer/h264_decoder.c index de823741ba9..b7174d097ad 100644 --- a/dlls/winegstreamer/h264_decoder.c +++ b/dlls/winegstreamer/h264_decoder.c @@ -556,10 +556,12 @@ static HRESULT WINAPI transform_ProcessOutput(IMFTransform *iface, DWORD flags, return hr;
if (wg_sample->max_size < info.cbSize) - hr = MF_E_BUFFERTOOSMALL; - else - hr = wg_transform_read_data(decoder->wg_transform, wg_sample); + { + mf_destroy_wg_sample(wg_sample); + return MF_E_BUFFERTOOSMALL; + }
+ hr = wg_transform_read_data(decoder->wg_transform, wg_sample); mf_destroy_wg_sample(wg_sample); return hr; } diff --git a/dlls/winegstreamer/wma_decoder.c b/dlls/winegstreamer/wma_decoder.c index 71369add244..70563649c9c 100644 --- a/dlls/winegstreamer/wma_decoder.c +++ b/dlls/winegstreamer/wma_decoder.c @@ -539,10 +539,12 @@ static HRESULT WINAPI transform_ProcessInput(IMFTransform *iface, DWORD id, IMFS
/* WMA transform uses fixed size input samples and ignores samples with invalid sizes */ if (wg_sample->size % info.cbSize) - hr = S_OK; - else - hr = wg_transform_push_data(decoder->wg_transform, wg_sample); + { + mf_destroy_wg_sample(wg_sample); + return S_OK; + }
+ hr = wg_transform_push_data(decoder->wg_transform, wg_sample); mf_destroy_wg_sample(wg_sample); return hr; } @@ -579,8 +581,12 @@ static HRESULT WINAPI transform_ProcessOutput(IMFTransform *iface, DWORD flags,
wg_sample->size = 0; if (wg_sample->max_size < info.cbSize) - hr = MF_E_BUFFERTOOSMALL; - else if (SUCCEEDED(hr = wg_transform_read_data(decoder->wg_transform, wg_sample))) + { + mf_destroy_wg_sample(wg_sample); + return MF_E_BUFFERTOOSMALL; + } + + if (SUCCEEDED(hr = wg_transform_read_data(decoder->wg_transform, wg_sample))) { if (wg_sample->flags & WG_SAMPLE_FLAG_INCOMPLETE) samples[0].dwStatus |= MFT_OUTPUT_DATA_BUFFER_INCOMPLETE;