diff --git a/ext/ffmpeg/gstffmpegtypes.c b/ext/ffmpeg/gstffmpegtypes.c index ec3c40be0a..cc95ca6027 100644 --- a/ext/ffmpeg/gstffmpegtypes.c +++ b/ext/ffmpeg/gstffmpegtypes.c @@ -61,6 +61,8 @@ gst_ffmpegtypes_typefind (GstBuffer *buffer, gpointer priv) if (highest) { GstCaps *caps; caps = g_hash_table_lookup (global_types, highest->name); + /* make sure we still hold a refcount to this caps */ + gst_caps_ref (caps); return caps; }