Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ccc8141b
Commit
ccc8141b
authored
Nov 07, 2010
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Nov 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Send EOS on exiting thread.
parent
6c35f135
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
gstdemux.c
dlls/winegstreamer/gstdemux.c
+11
-1
No files found.
dlls/winegstreamer/gstdemux.c
View file @
ccc8141b
...
...
@@ -411,11 +411,13 @@ static void release_sample(void *data) {
}
static
DWORD
CALLBACK
push_data
(
LPVOID
iface
)
{
LONGLONG
maxlen
,
curlen
;
GSTImpl
*
This
=
iface
;
IMediaSample
*
buf
;
DWORD_PTR
user
;
HRESULT
hr
;
IAsyncReader_Length
(
This
->
pInputPin
.
pReader
,
&
maxlen
,
&
curlen
);
TRACE
(
"Starting..
\n
"
);
for
(;;)
{
REFERENCE_TIME
tStart
,
tStop
;
...
...
@@ -428,7 +430,11 @@ static DWORD CALLBACK push_data(LPVOID iface) {
if
(
FAILED
(
hr
))
break
;
if
(
This
->
nextofs
>=
maxlen
)
break
;
len
=
IMediaSample_GetSize
(
buf
);
if
(
This
->
nextofs
+
len
>
maxlen
)
len
=
maxlen
-
This
->
nextofs
;
tStart
=
MEDIATIME_FROM_BYTES
(
This
->
nextofs
);
tStop
=
tStart
+
MEDIATIME_FROM_BYTES
(
len
);
...
...
@@ -451,7 +457,7 @@ static DWORD CALLBACK push_data(LPVOID iface) {
gstbuf
=
gst_app_buffer_new
(
data
,
IMediaSample_GetActualDataLength
(
buf
),
release_sample
,
buf
);
if
(
!
gstbuf
)
{
IMediaSample_Release
(
buf
);
return
S_OK
;
break
;
}
gstbuf
->
duration
=
gstbuf
->
timestamp
=
-
1
;
ret
=
gst_pad_push
(
This
->
my_src
,
gstbuf
);
...
...
@@ -469,6 +475,8 @@ static DWORD CALLBACK push_data(LPVOID iface) {
break
;
}
gst_pad_push_event
(
This
->
my_src
,
gst_event_new_eos
());
TRACE
(
"Almost stopping.. %08x
\n
"
,
hr
);
do
{
IAsyncReader_WaitForNext
(
This
->
pInputPin
.
pReader
,
0
,
&
buf
,
&
user
);
...
...
@@ -1447,6 +1455,8 @@ static HRESULT GST_RemoveOutputPins(GSTImpl *This) {
GSTOutPin
**
ppOldPins
=
This
->
ppPins
;
TRACE
(
"(%p)
\n
"
,
This
);
if
(
!
This
->
gstfilter
)
return
S_OK
;
gst_element_set_state
(
This
->
gstfilter
,
GST_STATE_NULL
);
gst_pad_unlink
(
This
->
my_src
,
This
->
their_sink
);
This
->
my_src
=
This
->
their_sink
=
NULL
;
...
...
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