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
b5f0b790
Commit
b5f0b790
authored
Jan 27, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Jan 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Use request_buffer_src() in push_data().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4a4ac273
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
26 deletions
+9
-26
gstdemux.c
dlls/winegstreamer/gstdemux.c
+9
-26
No files found.
dlls/winegstreamer/gstdemux.c
View file @
b5f0b790
...
...
@@ -821,13 +821,13 @@ static gboolean event_sink(GstPad *pad, GstObject *parent, GstEvent *event)
return
TRUE
;
}
static
GstFlowReturn
request_buffer_src
(
GstPad
*
pad
,
GstObject
*
parent
,
guint64
offset
,
guint
size
,
GstBuffer
**
buffer
);
static
DWORD
CALLBACK
push_data
(
LPVOID
iface
)
{
struct
parser
*
This
=
iface
;
GstMapInfo
mapping
;
GstBuffer
*
buffer
;
LONGLONG
maxlen
;
HRESULT
hr
;
if
(
!
(
buffer
=
gst_buffer_new_allocate
(
NULL
,
16384
,
NULL
)))
{
...
...
@@ -835,8 +835,6 @@ static DWORD CALLBACK push_data(LPVOID iface)
return
0
;
}
IBaseFilter_AddRef
(
&
This
->
filter
.
IBaseFilter_iface
);
maxlen
=
This
->
stop
?
This
->
stop
:
This
->
filesize
;
TRACE
(
"Starting..
\n
"
);
...
...
@@ -848,42 +846,27 @@ static DWORD CALLBACK push_data(LPVOID iface)
break
;
len
=
min
(
16384
,
maxlen
-
This
->
nextofs
);
if
(
!
gst_buffer_map_range
(
buffer
,
-
1
,
len
,
&
mapping
,
GST_MAP_WRITE
))
{
ERR
(
"Failed to map buffer.
\n
"
);
break
;
}
hr
=
IAsyncReader_SyncRead
(
This
->
reader
,
This
->
nextofs
,
len
,
mapping
.
data
);
gst_buffer_unmap
(
buffer
,
&
mapping
);
if
(
hr
!=
S_OK
)
if
((
ret
=
request_buffer_src
(
This
->
my_src
,
NULL
,
This
->
nextofs
,
len
,
&
buffer
))
<
0
)
{
ERR
(
"Failed to read data,
hr %#x.
\n
"
,
hr
);
ERR
(
"Failed to read data,
ret %s.
\n
"
,
gst_flow_get_name
(
ret
)
);
break
;
}
This
->
nextofs
+=
len
;
buffer
->
duration
=
buffer
->
pts
=
-
1
;
ret
=
gst_pad_push
(
This
->
my_src
,
buffer
);
if
(
ret
>=
0
)
hr
=
S_OK
;
else
ERR
(
"Sending returned: %i
\n
"
,
ret
);
if
(
ret
==
GST_FLOW_ERROR
)
hr
=
E_FAIL
;
else
if
(
ret
==
GST_FLOW_FLUSHING
)
hr
=
VFW_E_WRONG_STATE
;
if
(
hr
!=
S_OK
)
if
((
ret
=
gst_pad_push
(
This
->
my_src
,
buffer
))
<
0
)
{
ERR
(
"Failed to push data, ret %s.
\n
"
,
gst_flow_get_name
(
ret
));
break
;
}
}
gst_buffer_unref
(
buffer
);
gst_pad_push_event
(
This
->
my_src
,
gst_event_new_eos
());
TRACE
(
"Stopping.. %08x
\n
"
,
hr
);
IBaseFilter_Release
(
&
This
->
filter
.
IBaseFilter_iface
);
TRACE
(
"Stopping.
\n
"
);
return
0
;
}
...
...
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