Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
libnice
Commits
a28b0e0b
Commit
a28b0e0b
authored
Aug 10, 2009
by
Olivier Crête
Committed by
Youness Alaoui
Aug 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nicesrc: Don't leak a ref to the main context
parent
b5b35e85
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
gst/gstnicesrc.c
gst/gstnicesrc.c
+8
-4
gst/gstnicesrc.h
gst/gstnicesrc.h
+1
-0
No files found.
gst/gstnicesrc.c
View file @
a28b0e0b
...
...
@@ -180,7 +180,8 @@ gst_nice_src_init (GstNiceSrc *src, GstNiceSrcClass *g_class)
src
->
agent
=
NULL
;
src
->
stream_id
=
0
;
src
->
component_id
=
0
;
src
->
mainloop
=
g_main_loop_new
(
g_main_context_new
(),
FALSE
);
src
->
mainctx
=
g_main_context_new
();
src
->
mainloop
=
g_main_loop_new
(
src
->
mainctx
,
FALSE
);
src
->
unlocked
=
FALSE
;
src
->
idle_source
=
NULL
;
}
...
...
@@ -308,6 +309,10 @@ gst_nice_src_dispose (GObject *object)
g_main_loop_unref
(
src
->
mainloop
);
src
->
mainloop
=
NULL
;
if
(
src
->
mainctx
)
g_main_context_unref
(
src
->
mainctx
);
src
->
mainctx
=
NULL
;
GST_CALL_PARENT
(
G_OBJECT_CLASS
,
dispose
,
(
object
));
}
...
...
@@ -392,13 +397,12 @@ gst_nice_src_change_state (GstElement * element, GstStateChange transition)
else
{
nice_agent_attach_recv
(
src
->
agent
,
src
->
stream_id
,
src
->
component_id
,
g_main_loop_get_context
(
src
->
mainloop
),
gst_nice_src_read_callback
,
(
gpointer
)
src
);
src
->
mainctx
,
gst_nice_src_read_callback
,
(
gpointer
)
src
);
}
break
;
case
GST_STATE_CHANGE_READY_TO_NULL
:
nice_agent_attach_recv
(
src
->
agent
,
src
->
stream_id
,
src
->
component_id
,
g_main_loop_get_context
(
src
->
mainloop
)
,
NULL
,
NULL
);
src
->
mainctx
,
NULL
,
NULL
);
break
;
default:
break
;
...
...
gst/gstnicesrc.h
View file @
a28b0e0b
...
...
@@ -65,6 +65,7 @@ struct _GstNiceSrc
NiceAgent
*
agent
;
guint
stream_id
;
guint
component_id
;
GMainContext
*
mainctx
;
GMainLoop
*
mainloop
;
guint64
offset
;
GstFlowReturn
flow_ret
;
...
...
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