winegstreamer: Only resize buffer when read is incomplete.

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>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2022-04-24 22:57:27 +02:00 committed by Alexandre Julliard
parent 7144bf27b9
commit 915d88e5e6
1 changed files with 3 additions and 1 deletions

View File

@ -398,7 +398,9 @@ static NTSTATUS read_transform_output_data(GstBuffer *buffer, struct wg_sample *
memcpy(sample->data, info.data, sample->size);
gst_buffer_unmap(buffer, &info);
gst_buffer_resize(buffer, sample->size, -1);
if (sample->flags & WG_SAMPLE_FLAG_INCOMPLETE)
gst_buffer_resize(buffer, sample->size, -1);
if (GST_BUFFER_PTS_IS_VALID(buffer))
{