diff options
author | Lionel Landwerlin <llandwerlin@gmail.com> | 2013-12-16 13:58:53 +0000 |
---|---|---|
committer | Lionel Landwerlin <llandwerlin@gmail.com> | 2013-12-16 13:58:53 +0000 |
commit | e289cc17945d9972d60276965aeba6568c05428b (patch) | |
tree | 9d0236fd0afdcc7d6e3bd9e1bf96e95f046529ec | |
parent | 94598e6c1780df926c8de7c261124663518e22c3 (diff) | |
download | clutter-gst-e289cc17945d9972d60276965aeba6568c05428b.tar.gz |
video-sink: don't use strings that can be freed in shader cache
Patch by Vladimir Caruntu
-rw-r--r-- | clutter-gst/clutter-gst-video-sink.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clutter-gst/clutter-gst-video-sink.c b/clutter-gst/clutter-gst-video-sink.c index 2c8f75a..88430db 100644 --- a/clutter-gst/clutter-gst-video-sink.c +++ b/clutter-gst/clutter-gst-video-sink.c @@ -691,14 +691,15 @@ _get_cached_cogl_program (const char *source) if (G_UNLIKELY (program_cache == NULL)) { program_cache = g_hash_table_new_full (g_str_hash, g_str_equal, - NULL, (GDestroyNotify) cogl_handle_unref); + (GDestroyNotify) g_free, + (GDestroyNotify) cogl_handle_unref); } handle = (CoglHandle) g_hash_table_lookup (program_cache, (gpointer) source); if (handle == COGL_INVALID_HANDLE) { handle = _create_cogl_program (source); g_hash_table_insert (program_cache, - (gpointer) source, + (gpointer) g_strdup (source), (gpointer) cogl_handle_ref (handle)); } |