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
85d81ae9
Commit
85d81ae9
authored
Jan 15, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Jan 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Avoid leaking GstEvent objects.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b5540862
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
gstdemux.c
dlls/winegstreamer/gstdemux.c
+16
-10
No files found.
dlls/winegstreamer/gstdemux.c
View file @
85d81ae9
...
...
@@ -624,12 +624,14 @@ static gboolean gst_base_src_perform_seek(struct parser *This, GstEvent *event)
static
gboolean
event_src
(
GstPad
*
pad
,
GstObject
*
parent
,
GstEvent
*
event
)
{
struct
parser
*
This
=
gst_pad_get_element_private
(
pad
);
gboolean
ret
=
TRUE
;
TRACE
(
"filter %p, type
\"
%s
\"
.
\n
"
,
This
,
GST_EVENT_TYPE_NAME
(
event
));
switch
(
event
->
type
)
{
case
GST_EVENT_SEEK
:
return
gst_base_src_perform_seek
(
This
,
event
);
ret
=
gst_base_src_perform_seek
(
This
,
event
);
break
;
case
GST_EVENT_FLUSH_START
:
EnterCriticalSection
(
&
This
->
filter
.
csFilter
);
if
(
This
->
reader
)
...
...
@@ -649,13 +651,13 @@ static gboolean event_src(GstPad *pad, GstObject *parent, GstEvent *event)
case
GST_EVENT_RECONFIGURE
:
return
gst_pad_event_default
(
pad
,
parent
,
event
);
}
return
TRUE
;
gst_event_unref
(
event
);
return
ret
;
}
static
gboolean
event_sink
(
GstPad
*
pad
,
GstObject
*
parent
,
GstEvent
*
event
)
{
struct
parser_source
*
pin
=
gst_pad_get_element_private
(
pad
);
gboolean
ret
;
TRACE
(
"pin %p, type
\"
%s
\"
.
\n
"
,
pin
,
GST_EVENT_TYPE_NAME
(
event
));
...
...
@@ -675,7 +677,7 @@ static gboolean event_sink(GstPad *pad, GstObject *parent, GstEvent *event)
if
(
segment
->
format
!=
GST_FORMAT_TIME
)
{
FIXME
(
"Unhandled format
\"
%s
\"
.
\n
"
,
gst_format_get_name
(
segment
->
format
));
return
TRUE
;
break
;
}
gst_segment_copy_into
(
segment
,
pin
->
segment
);
...
...
@@ -688,14 +690,14 @@ static gboolean event_sink(GstPad *pad, GstObject *parent, GstEvent *event)
if
(
pin
->
pin
.
pin
.
peer
)
IPin_NewSegment
(
pin
->
pin
.
pin
.
peer
,
pos
,
stop
,
rate
*
applied_rate
);
return
TRUE
;
break
;
}
case
GST_EVENT_EOS
:
if
(
pin
->
pin
.
pin
.
peer
)
IPin_EndOfStream
(
pin
->
pin
.
pin
.
peer
);
else
SetEvent
(
pin
->
eos_event
);
return
TRUE
;
break
;
case
GST_EVENT_FLUSH_START
:
if
(
impl_from_strmbase_filter
(
pin
->
pin
.
pin
.
filter
)
->
ignore_flush
)
{
/* gst-plugins-base prior to 1.7 contains a bug which causes
...
...
@@ -706,24 +708,28 @@ static gboolean event_sink(GstPad *pad, GstObject *parent, GstEvent *event)
* unset the flushing flag to avoid the problem. */
TRACE
(
"Working around gst <1.7 bug, ignoring FLUSH_START
\n
"
);
GST_PAD_UNSET_FLUSHING
(
pad
);
return
TRUE
;
break
;
}
if
(
pin
->
pin
.
pin
.
peer
)
IPin_BeginFlush
(
pin
->
pin
.
pin
.
peer
);
return
TRUE
;
break
;
case
GST_EVENT_FLUSH_STOP
:
gst_segment_init
(
pin
->
segment
,
GST_FORMAT_TIME
);
if
(
pin
->
pin
.
pin
.
peer
)
IPin_EndFlush
(
pin
->
pin
.
pin
.
peer
);
return
TRUE
;
break
;
case
GST_EVENT_CAPS
:
ret
=
gst_pad_event_default
(
pad
,
parent
,
event
);
{
gboolean
ret
=
gst_pad_event_default
(
pad
,
parent
,
event
);
SetEvent
(
pin
->
caps_event
);
return
ret
;
}
default:
WARN
(
"Ignoring
\"
%s
\"
event.
\n
"
,
GST_EVENT_TYPE_NAME
(
event
));
return
gst_pad_event_default
(
pad
,
parent
,
event
);
}
gst_event_unref
(
event
);
return
TRUE
;
}
static
DWORD
CALLBACK
push_data
(
LPVOID
iface
)
...
...
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