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
c46505c0
Commit
c46505c0
authored
Feb 10, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 11, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Defer source pin creation until after all pads are exposed.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fd7c07ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
12 deletions
+26
-12
gstdemux.c
dlls/winegstreamer/gstdemux.c
+26
-12
No files found.
dlls/winegstreamer/gstdemux.c
View file @
c46505c0
...
...
@@ -1584,21 +1584,16 @@ static void free_stream(struct wg_parser_stream *stream);
static
void
init_new_decoded_pad
(
GstElement
*
bin
,
GstPad
*
pad
,
struct
parser
*
This
)
{
static
const
WCHAR
formatW
[]
=
{
'S'
,
't'
,
'r'
,
'e'
,
'a'
,
'm'
,
' '
,
'%'
,
'0'
,
'2'
,
'u'
,
0
};
struct
wg_parser
*
parser
=
This
->
wg_parser
;
struct
wg_parser_stream
*
stream
;
const
char
*
typename
;
char
*
name
;
GstCaps
*
caps
;
GstStructure
*
arg
;
struct
parser_source
*
pin
;
int
ret
;
WCHAR
nameW
[
128
];
TRACE
(
"%p %p %p
\n
"
,
This
,
bin
,
pad
);
sprintfW
(
nameW
,
formatW
,
This
->
source_count
);
name
=
gst_pad_get_name
(
pad
);
TRACE
(
"Name: %s
\n
"
,
name
);
g_free
(
name
);
...
...
@@ -1611,12 +1606,6 @@ static void init_new_decoded_pad(GstElement *bin, GstPad *pad, struct parser *Th
if
(
!
(
stream
=
create_stream
(
parser
)))
goto
out
;
if
(
!
(
pin
=
create_pin
(
This
,
stream
,
nameW
)))
{
free_stream
(
stream
);
goto
out
;
}
if
(
!
strcmp
(
typename
,
"video/x-raw"
))
{
GstElement
*
deinterlace
,
*
vconv
,
*
flip
,
*
vconv2
;
...
...
@@ -2203,8 +2192,11 @@ static const struct strmbase_sink_ops sink_ops =
static
BOOL
decodebin_parser_init_gst
(
struct
parser
*
filter
)
{
static
const
WCHAR
formatW
[]
=
{
'S'
,
't'
,
'r'
,
'e'
,
'a'
,
'm'
,
' '
,
'%'
,
'0'
,
'2'
,
'u'
,
0
};
GstElement
*
element
=
gst_element_factory_make
(
"decodebin"
,
NULL
);
struct
wg_parser
*
parser
=
filter
->
wg_parser
;
WCHAR
source_name
[
20
];
unsigned
int
i
;
int
ret
;
if
(
!
element
)
...
...
@@ -2250,6 +2242,14 @@ static BOOL decodebin_parser_init_gst(struct parser *filter)
return
FALSE
;
}
pthread_mutex_unlock
(
&
parser
->
mutex
);
for
(
i
=
0
;
i
<
parser
->
stream_count
;
++
i
)
{
sprintfW
(
source_name
,
formatW
,
i
);
if
(
!
create_pin
(
filter
,
parser
->
streams
[
i
],
source_name
))
return
FALSE
;
}
return
TRUE
;
}
...
...
@@ -2909,7 +2909,10 @@ static HRESULT GST_RemoveOutputPins(struct parser *This)
CloseHandle
(
This
->
read_thread
);
for
(
i
=
0
;
i
<
This
->
source_count
;
++
i
)
free_source_pin
(
This
->
sources
[
i
]);
{
if
(
This
->
sources
[
i
])
free_source_pin
(
This
->
sources
[
i
]);
}
This
->
source_count
=
0
;
heap_free
(
This
->
sources
);
...
...
@@ -3094,8 +3097,11 @@ static const struct strmbase_sink_ops avi_splitter_sink_ops =
static
BOOL
avi_splitter_init_gst
(
struct
parser
*
filter
)
{
static
const
WCHAR
formatW
[]
=
{
'S'
,
't'
,
'r'
,
'e'
,
'a'
,
'm'
,
' '
,
'%'
,
'0'
,
'2'
,
'u'
,
0
};
GstElement
*
element
=
gst_element_factory_make
(
"avidemux"
,
NULL
);
struct
wg_parser
*
parser
=
filter
->
wg_parser
;
WCHAR
source_name
[
20
];
unsigned
int
i
;
int
ret
;
if
(
!
element
)
...
...
@@ -3140,6 +3146,14 @@ static BOOL avi_splitter_init_gst(struct parser *filter)
return
FALSE
;
}
pthread_mutex_unlock
(
&
parser
->
mutex
);
for
(
i
=
0
;
i
<
parser
->
stream_count
;
++
i
)
{
sprintfW
(
source_name
,
formatW
,
i
);
if
(
!
create_pin
(
filter
,
parser
->
streams
[
i
],
source_name
))
return
FALSE
;
}
return
TRUE
;
}
...
...
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