Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4a6a3b90
Commit
4a6a3b90
authored
Feb 16, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Apr 16, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Introduce a new sample_needs_buffer_copy helper.
parent
b2ea55a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
wg_transform.c
dlls/winegstreamer/wg_transform.c
+14
-7
No files found.
dlls/winegstreamer/wg_transform.c
View file @
4a6a3b90
...
...
@@ -821,13 +821,10 @@ static void set_sample_flags_from_buffer(struct wg_sample *sample, GstBuffer *bu
sample
->
flags
|=
WG_SAMPLE_FLAG_DISCONTINUITY
;
}
static
NTSTATUS
read_transform_output_data
(
GstBuffer
*
buffer
,
GstCaps
*
caps
,
gsize
plane_align
,
struct
wg_sample
*
sample
)
static
bool
sample_needs_buffer_copy
(
struct
wg_sample
*
sample
,
GstBuffer
*
buffer
,
gsize
*
total_size
)
{
gsize
total_size
;
bool
needs_copy
;
NTSTATUS
status
;
GstMapInfo
info
;
bool
needs_copy
;
if
(
!
gst_buffer_map
(
buffer
,
&
info
,
GST_MAP_READ
))
{
...
...
@@ -836,10 +833,20 @@ static NTSTATUS read_transform_output_data(GstBuffer *buffer, GstCaps *caps, gsi
return
STATUS_UNSUCCESSFUL
;
}
needs_copy
=
info
.
data
!=
wg_sample_data
(
sample
);
total_size
=
sample
->
size
=
info
.
size
;
*
total_size
=
sample
->
size
=
info
.
size
;
gst_buffer_unmap
(
buffer
,
&
info
);
if
(
!
needs_copy
)
return
needs_copy
;
}
static
NTSTATUS
read_transform_output_data
(
GstBuffer
*
buffer
,
GstCaps
*
caps
,
gsize
plane_align
,
struct
wg_sample
*
sample
)
{
gsize
total_size
;
NTSTATUS
status
;
bool
needs_copy
;
if
(
!
(
needs_copy
=
sample_needs_buffer_copy
(
sample
,
buffer
,
&
total_size
)))
status
=
STATUS_SUCCESS
;
else
if
(
stream_type_from_caps
(
caps
)
==
GST_STREAM_TYPE_VIDEO
)
status
=
copy_video_buffer
(
buffer
,
caps
,
plane_align
,
sample
,
&
total_size
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment