mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-06 14:32:31 +00:00
rtsp-media-factory: Don't cache any media if NULL was returned as key
The docs already mentioned this, but we actually stored it in the hash table with key==NULL and leaked its reference forever.
This commit is contained in:
parent
f1088f368f
commit
c04e3b07dd
1 changed files with 1 additions and 1 deletions
|
@ -1216,7 +1216,7 @@ gst_rtsp_media_factory_construct (GstRTSPMediaFactory * factory,
|
|||
NULL);
|
||||
|
||||
/* check if we can cache this media */
|
||||
if (gst_rtsp_media_is_shared (media)) {
|
||||
if (gst_rtsp_media_is_shared (media) && key) {
|
||||
/* insert in the hashtable, takes ownership of the key */
|
||||
g_object_ref (media);
|
||||
g_hash_table_insert (priv->medias, key, media);
|
||||
|
|
Loading…
Reference in a new issue