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
2567ff49
Commit
2567ff49
authored
Apr 12, 2022
by
Anton Baskanov
Committed by
Alexandre Julliard
May 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Set sample timestamps in MPEG audio decoder.
Signed-off-by:
Anton Baskanov
<
baskanov@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5db4b0cf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
3 deletions
+31
-3
mpegaudio.c
dlls/quartz/tests/mpegaudio.c
+3
-3
quartz_transform.c
dlls/winegstreamer/quartz_transform.c
+28
-0
No files found.
dlls/quartz/tests/mpegaudio.c
View file @
2567ff49
...
...
@@ -888,11 +888,11 @@ static HRESULT WINAPI testsink_Receive(struct strmbase_sink *iface, IMediaSample
start
=
0xdeadbeef
;
stop
=
0xdeadbeef
;
hr
=
IMediaSample_GetTime
(
sample
,
&
start
,
&
stop
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
if
(
filter
->
got_sample
==
1
)
{
todo_wine
ok
(
start
==
filter
->
expected_start_time
,
"Got start time %s.
\n
"
,
wine_dbgstr_longlong
(
start
));
todo_wine
ok
(
stop
==
filter
->
expected_stop_time
,
"Got stop time %s.
\n
"
,
wine_dbgstr_longlong
(
stop
));
ok
(
start
==
filter
->
expected_start_time
,
"Got start time %s.
\n
"
,
wine_dbgstr_longlong
(
start
));
ok
(
stop
==
filter
->
expected_stop_time
,
"Got stop time %s.
\n
"
,
wine_dbgstr_longlong
(
stop
));
}
return
S_OK
;
...
...
dlls/winegstreamer/quartz_transform.c
View file @
2567ff49
...
...
@@ -281,6 +281,8 @@ static HRESULT WINAPI transform_sink_receive(struct strmbase_sink *pin, IMediaSa
{
struct
transform
*
filter
=
impl_from_strmbase_filter
(
pin
->
pin
.
filter
);
struct
wg_sample
input_wg_sample
=
{
0
};
REFERENCE_TIME
start_time
;
REFERENCE_TIME
end_time
;
HRESULT
hr
;
/* We do not expect pin connection state to change while the filter is
...
...
@@ -306,6 +308,18 @@ static HRESULT WINAPI transform_sink_receive(struct strmbase_sink *pin, IMediaSa
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IMediaSample_GetTime
(
sample
,
&
start_time
,
&
end_time
);
if
(
SUCCEEDED
(
hr
))
{
input_wg_sample
.
pts
=
start_time
;
input_wg_sample
.
flags
|=
WG_SAMPLE_FLAG_HAS_PTS
;
}
if
(
hr
==
S_OK
)
{
input_wg_sample
.
duration
=
end_time
-
start_time
;
input_wg_sample
.
flags
|=
WG_SAMPLE_FLAG_HAS_DURATION
;
}
hr
=
wg_transform_push_data
(
filter
->
transform
,
&
input_wg_sample
);
if
(
FAILED
(
hr
))
return
hr
;
...
...
@@ -347,6 +361,20 @@ static HRESULT WINAPI transform_sink_receive(struct strmbase_sink *pin, IMediaSa
return
hr
;
}
if
(
output_wg_sample
.
flags
&
WG_SAMPLE_FLAG_HAS_PTS
)
{
start_time
=
output_wg_sample
.
pts
;
if
(
output_wg_sample
.
flags
&
WG_SAMPLE_FLAG_HAS_DURATION
)
{
end_time
=
start_time
+
output_wg_sample
.
duration
;
IMediaSample_SetTime
(
output_sample
,
&
start_time
,
&
end_time
);
}
else
{
IMediaSample_SetTime
(
output_sample
,
&
start_time
,
NULL
);
}
}
hr
=
IMemInputPin_Receive
(
filter
->
source
.
pMemInputPin
,
output_sample
);
if
(
FAILED
(
hr
))
{
...
...
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