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
13059c22
Commit
13059c22
authored
Oct 11, 2022
by
Anton Baskanov
Committed by
Alexandre Julliard
Nov 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Set the discontinuity flag in wg_transform.
This is required to avoid glitches when seeking, as some formats (e.g. MP3) may use data from previous frames.
parent
5a80ace0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
unixlib.h
dlls/winegstreamer/unixlib.h
+1
-0
wg_sample.c
dlls/winegstreamer/wg_sample.c
+8
-0
wg_transform.c
dlls/winegstreamer/wg_transform.c
+4
-0
No files found.
dlls/winegstreamer/unixlib.h
View file @
13059c22
...
...
@@ -135,6 +135,7 @@ enum wg_sample_flag
WG_SAMPLE_FLAG_HAS_PTS
=
2
,
WG_SAMPLE_FLAG_HAS_DURATION
=
4
,
WG_SAMPLE_FLAG_SYNC_POINT
=
8
,
WG_SAMPLE_FLAG_DISCONTINUITY
=
0x10
,
};
struct
wg_sample
...
...
dlls/winegstreamer/wg_sample.c
View file @
13059c22
...
...
@@ -277,6 +277,8 @@ HRESULT wg_transform_push_mf(struct wg_transform *transform, IMFSample *sample,
}
if
(
SUCCEEDED
(
IMFSample_GetUINT32
(
sample
,
&
MFSampleExtension_CleanPoint
,
&
value
))
&&
value
)
wg_sample
->
flags
|=
WG_SAMPLE_FLAG_SYNC_POINT
;
if
(
SUCCEEDED
(
IMFSample_GetUINT32
(
sample
,
&
MFSampleExtension_Discontinuity
,
&
value
))
&&
value
)
wg_sample
->
flags
|=
WG_SAMPLE_FLAG_DISCONTINUITY
;
wg_sample_queue_begin_append
(
queue
,
wg_sample
);
hr
=
wg_transform_push_data
(
transform
,
wg_sample
);
...
...
@@ -320,6 +322,8 @@ HRESULT wg_transform_read_mf(struct wg_transform *transform, IMFSample *sample,
IMFSample_SetSampleDuration
(
sample
,
wg_sample
->
duration
);
if
(
wg_sample
->
flags
&
WG_SAMPLE_FLAG_SYNC_POINT
)
IMFSample_SetUINT32
(
sample
,
&
MFSampleExtension_CleanPoint
,
1
);
if
(
wg_sample
->
flags
&
WG_SAMPLE_FLAG_DISCONTINUITY
)
IMFSample_SetUINT32
(
sample
,
&
MFSampleExtension_Discontinuity
,
1
);
if
(
SUCCEEDED
(
hr
=
IMFSample_ConvertToContiguousBuffer
(
sample
,
&
buffer
)))
{
...
...
@@ -354,6 +358,8 @@ HRESULT wg_transform_push_quartz(struct wg_transform *transform, struct wg_sampl
if
(
IMediaSample_IsSyncPoint
(
sample
->
u
.
quartz
.
sample
)
==
S_OK
)
wg_sample
->
flags
|=
WG_SAMPLE_FLAG_SYNC_POINT
;
if
(
IMediaSample_IsDiscontinuity
(
sample
->
u
.
quartz
.
sample
)
==
S_OK
)
wg_sample
->
flags
|=
WG_SAMPLE_FLAG_DISCONTINUITY
;
wg_sample_queue_begin_append
(
queue
,
wg_sample
);
hr
=
wg_transform_push_data
(
transform
,
wg_sample
);
...
...
@@ -397,6 +403,8 @@ HRESULT wg_transform_read_quartz(struct wg_transform *transform, struct wg_sampl
value
=
!!
(
wg_sample
->
flags
&
WG_SAMPLE_FLAG_SYNC_POINT
);
IMediaSample_SetSyncPoint
(
sample
->
u
.
quartz
.
sample
,
value
);
value
=
!!
(
wg_sample
->
flags
&
WG_SAMPLE_FLAG_DISCONTINUITY
);
IMediaSample_SetDiscontinuity
(
sample
->
u
.
quartz
.
sample
,
value
);
return
S_OK
;
}
dlls/winegstreamer/wg_transform.c
View file @
13059c22
...
...
@@ -648,6 +648,8 @@ NTSTATUS wg_transform_push_data(void *args)
GST_BUFFER_DURATION
(
buffer
)
=
sample
->
duration
*
100
;
if
(
!
(
sample
->
flags
&
WG_SAMPLE_FLAG_SYNC_POINT
))
GST_BUFFER_FLAG_SET
(
buffer
,
GST_BUFFER_FLAG_DELTA_UNIT
);
if
(
sample
->
flags
&
WG_SAMPLE_FLAG_DISCONTINUITY
)
GST_BUFFER_FLAG_SET
(
buffer
,
GST_BUFFER_FLAG_DISCONT
);
gst_atomic_queue_push
(
transform
->
input_queue
,
buffer
);
params
->
result
=
S_OK
;
...
...
@@ -781,6 +783,8 @@ static NTSTATUS read_transform_output_data(GstBuffer *buffer, GstCaps *caps, gsi
}
if
(
!
GST_BUFFER_FLAG_IS_SET
(
buffer
,
GST_BUFFER_FLAG_DELTA_UNIT
))
sample
->
flags
|=
WG_SAMPLE_FLAG_SYNC_POINT
;
if
(
GST_BUFFER_FLAG_IS_SET
(
buffer
,
GST_BUFFER_FLAG_DISCONT
))
sample
->
flags
|=
WG_SAMPLE_FLAG_DISCONTINUITY
;
if
(
needs_copy
)
{
...
...
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