mf/sar: Query for current padding before requesting sample buffer.
commitda171b8f90d07fa80a4b1bb53b3b295a3e0f003a
authorGiovanni Mascellani <gmascellani@codeweavers.com>
Mon, 21 Jun 2021 15:52:53 +0000 (21 17:52 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 22 Jun 2021 15:57:47 +0000 (22 17:57 +0200)
tree9a25b6ce1ad3ca5d2386af4dc1e2d7340665249f
parent95817b6386a9b9531d60ba86433e3055a1dc0a7e
mf/sar: Query for current padding before requesting sample buffer.

According to both MSDN and our impementation, GetBufferSize returns the
size of the buffer, but it doesn't guarantee that all of it is available.
In order to know how much of it is available, the caller must also call
GetCurrentPadding and subtract that number to the buffer size. Failing
to do so might result in GetBuffer returning an error.

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/mf/sar.c