Rémi Bernon : winegstreamer: Only resize buffer when read is incomplete.

Alexandre Julliard julliard at winehq.org
Fri May 6 15:38:39 CDT 2022


Module: wine
Branch: master
Commit: 915d88e5e60aa08b377eca5c5cbeed6a3d2d4af5
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=915d88e5e60aa08b377eca5c5cbeed6a3d2d4af5

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Sun Apr 24 22:57:27 2022 +0200

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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winegstreamer/wg_transform.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlls/winegstreamer/wg_transform.c b/dlls/winegstreamer/wg_transform.c
index 02f93bd95c0..3e285e8c943 100644
--- a/dlls/winegstreamer/wg_transform.c
+++ b/dlls/winegstreamer/wg_transform.c
@@ -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))
     {




More information about the wine-cvs mailing list