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
f595a3f9
Commit
f595a3f9
authored
May 12, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
May 16, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Remove unnecessary wg_parser their_sink pad.
parent
f3b9ea7a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
32 deletions
+8
-32
wg_parser.c
dlls/winegstreamer/wg_parser.c
+8
-32
No files found.
dlls/winegstreamer/wg_parser.c
View file @
f595a3f9
...
...
@@ -66,7 +66,7 @@ struct wg_parser
GstElement
*
container
,
*
decodebin
;
GstBus
*
bus
;
GstPad
*
my_src
,
*
their_sink
;
GstPad
*
my_src
;
guint64
file_size
,
start_offset
,
next_offset
,
stop_offset
;
guint64
next_pull_offset
;
...
...
@@ -1679,11 +1679,8 @@ static NTSTATUS wg_parser_connect(void *args)
out:
if
(
parser
->
container
)
gst_element_set_state
(
parser
->
container
,
GST_STATE_NULL
);
if
(
parser
->
their_sink
)
{
gst_object_unref
(
parser
->
their_sink
);
parser
->
my_src
=
parser
->
their_sink
=
NULL
;
}
if
(
parser
->
my_src
)
gst_object_unref
(
parser
->
my_src
);
for
(
i
=
0
;
i
<
parser
->
stream_count
;
++
i
)
free_stream
(
parser
->
streams
[
i
]);
...
...
@@ -1725,8 +1722,7 @@ static NTSTATUS wg_parser_disconnect(void *args)
gst_element_set_state
(
parser
->
container
,
GST_STATE_NULL
);
gst_object_unref
(
parser
->
my_src
);
gst_object_unref
(
parser
->
their_sink
);
parser
->
my_src
=
parser
->
their_sink
=
NULL
;
parser
->
my_src
=
NULL
;
pthread_mutex_lock
(
&
parser
->
mutex
);
parser
->
sink_connected
=
false
;
...
...
@@ -1762,7 +1758,6 @@ static NTSTATUS wg_parser_disconnect(void *args)
static
BOOL
decodebin_parser_init_gst
(
struct
wg_parser
*
parser
)
{
GstElement
*
element
;
int
ret
;
if
(
!
(
element
=
create_element
(
"decodebin"
,
"base"
)))
return
FALSE
;
...
...
@@ -1783,17 +1778,12 @@ static BOOL decodebin_parser_init_gst(struct wg_parser *parser)
g_signal_connect
(
element
,
"autoplug-select"
,
G_CALLBACK
(
autoplug_select_cb
),
parser
);
g_signal_connect
(
element
,
"no-more-pads"
,
G_CALLBACK
(
no_more_pads_cb
),
parser
);
parser
->
their_sink
=
gst_element_get_static_pad
(
element
,
"sink"
);
pthread_mutex_lock
(
&
parser
->
mutex
);
parser
->
no_more_pads
=
false
;
pthread_mutex_unlock
(
&
parser
->
mutex
);
if
((
ret
=
gst_pad_link
(
parser
->
my_src
,
parser
->
their_sink
))
<
0
)
{
GST_ERROR
(
"Failed to link pads, error %d."
,
ret
);
if
(
!
link_src_to_element
(
parser
->
my_src
,
element
))
return
FALSE
;
}
return
TRUE
;
}
...
...
@@ -1801,7 +1791,6 @@ static BOOL decodebin_parser_init_gst(struct wg_parser *parser)
static
BOOL
avi_parser_init_gst
(
struct
wg_parser
*
parser
)
{
GstElement
*
element
;
int
ret
;
if
(
!
(
element
=
create_element
(
"avidemux"
,
"good"
)))
return
FALSE
;
...
...
@@ -1812,17 +1801,12 @@ static BOOL avi_parser_init_gst(struct wg_parser *parser)
g_signal_connect
(
element
,
"pad-removed"
,
G_CALLBACK
(
pad_removed_cb
),
parser
);
g_signal_connect
(
element
,
"no-more-pads"
,
G_CALLBACK
(
no_more_pads_cb
),
parser
);
parser
->
their_sink
=
gst_element_get_static_pad
(
element
,
"sink"
);
pthread_mutex_lock
(
&
parser
->
mutex
);
parser
->
no_more_pads
=
false
;
pthread_mutex_unlock
(
&
parser
->
mutex
);
if
((
ret
=
gst_pad_link
(
parser
->
my_src
,
parser
->
their_sink
))
<
0
)
{
GST_ERROR
(
"Failed to link pads, error %d."
,
ret
);
if
(
!
link_src_to_element
(
parser
->
my_src
,
element
))
return
FALSE
;
}
return
TRUE
;
}
...
...
@@ -1838,12 +1822,8 @@ static BOOL mpeg_audio_parser_init_gst(struct wg_parser *parser)
gst_bin_add
(
GST_BIN
(
parser
->
container
),
element
);
parser
->
their_sink
=
gst_element_get_static_pad
(
element
,
"sink"
);
if
((
ret
=
gst_pad_link
(
parser
->
my_src
,
parser
->
their_sink
))
<
0
)
{
GST_ERROR
(
"Failed to link sink pads, error %d."
,
ret
);
if
(
!
link_src_to_element
(
parser
->
my_src
,
element
))
return
FALSE
;
}
if
(
!
(
stream
=
create_stream
(
parser
)))
return
FALSE
;
...
...
@@ -1872,12 +1852,8 @@ static BOOL wave_parser_init_gst(struct wg_parser *parser)
gst_bin_add
(
GST_BIN
(
parser
->
container
),
element
);
parser
->
their_sink
=
gst_element_get_static_pad
(
element
,
"sink"
);
if
((
ret
=
gst_pad_link
(
parser
->
my_src
,
parser
->
their_sink
))
<
0
)
{
GST_ERROR
(
"Failed to link sink pads, error %d."
,
ret
);
if
(
!
link_src_to_element
(
parser
->
my_src
,
element
))
return
FALSE
;
}
if
(
!
(
stream
=
create_stream
(
parser
)))
return
FALSE
;
...
...
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