[PATCH 3/4] quartz/vmr9: Remove the now redundant memcpy.
Anton Baskanov
baskanov at gmail.com
Sun Aug 29 08:31:40 CDT 2021
Signed-off-by: Anton Baskanov <baskanov at gmail.com>
---
dlls/quartz/vmr9.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c
index ed1cc6b729c..09160e53337 100644
--- a/dlls/quartz/vmr9.c
+++ b/dlls/quartz/vmr9.c
@@ -240,8 +240,8 @@ static void copy_plane(int height, int row_size, int src_pitch, int dst_pitch, B
static HRESULT vmr_render(struct strmbase_renderer *iface, IMediaSample *sample)
{
struct quartz_vmr *filter = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface);
- unsigned int data_size, width, depth, src_pitch;
const BITMAPINFOHEADER *bitmap_header;
+ unsigned int width, depth, src_pitch;
REFERENCE_TIME start_time, end_time;
VMR9PresentationInfo info = {};
D3DLOCKED_RECT locked_rect;
@@ -278,7 +278,6 @@ static HRESULT vmr_render(struct strmbase_renderer *iface, IMediaSample *sample)
ERR("Failed to get pointer to sample data, hr %#x.\n", hr);
return hr;
}
- data_size = IMediaSample_GetActualDataLength(sample);
bitmap_header = get_bitmap_header(&filter->renderer.sink.pin.mt);
width = bitmap_header->biWidth;
@@ -325,15 +324,11 @@ static HRESULT vmr_render(struct strmbase_renderer *iface, IMediaSample *sample)
copy_plane(height, width * depth / 8, -(int)src_pitch, locked_rect.Pitch,
data + src_pitch * (height - 1), locked_rect.pBits);
}
- else if (locked_rect.Pitch != src_pitch)
+ else
{
copy_plane(abs(height), width * depth / 8, src_pitch, locked_rect.Pitch,
data, locked_rect.pBits);
}
- else
- {
- memcpy(locked_rect.pBits, data, data_size);
- }
IDirect3DSurface9_UnlockRect(info.lpSurf);
--
2.25.1
More information about the wine-devel
mailing list