projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7edaa6c
)
stream: don't leak stats structure
author
Wim Taymans
<wtaymans@redhat.com>
Tue, 28 Jan 2014 13:51:26 +0000
(14:51 +0100)
committer
Wim Taymans
<wtaymans@redhat.com>
Tue, 28 Jan 2014 13:51:26 +0000
(14:51 +0100)
Don't leak the stats structure and deal with NULL stats.
gst/rtsp-server/rtsp-stream.c
patch
|
blob
|
history
diff --git
a/gst/rtsp-server/rtsp-stream.c
b/gst/rtsp-server/rtsp-stream.c
index
a6b9494
..
dfc0349
100644
(file)
--- a/
gst/rtsp-server/rtsp-stream.c
+++ b/
gst/rtsp-server/rtsp-stream.c
@@
-1889,6
+1889,9
@@
gst_rtsp_stream_get_rtpinfo (GstRTSPStream * stream,
g_object_get (priv->payloader, "stats", &stats, NULL);
+ if (stats == NULL)
+ goto no_stats;
+
if (seq)
gst_structure_get_uint (stats, "seqnum", seq);
@@
-1904,9
+1907,19
@@
gst_rtsp_stream_get_rtpinfo (GstRTSPStream * stream,
*running_time = GST_CLOCK_TIME_NONE;
}
+ gst_structure_free (stats);
+
g_mutex_unlock (&priv->lock);
return TRUE;
+
+ /* ERRORS */
+no_stats:
+ {
+ GST_WARNING ("Could not get payloader stats");
+ g_mutex_unlock (&priv->lock);
+ return FALSE;
+ }
}
/**