[tracker] tracker-extract: Blacklist vaapi/bmcdec gstreamer elements
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract: Blacklist vaapi/bmcdec gstreamer elements
- Date: Sun, 4 Jun 2017 15:45:00 +0000 (UTC)
commit 8952c69051eaa2bbd5b50eb316422f0931e000ae
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Jun 4 17:37:18 2017 +0200
tracker-extract: Blacklist vaapi/bmcdec gstreamer elements
Remove these from the registry after initialization, the vaapi
one could just cause undesired output/warnings after seccomp forbid
it to do something. The bmcdec element is dumber and would just
crash after shmget() despite trying to refuse it politely with an
appropriate errno.
Fixes SIGSYS on shmget() from gstreamer1-plugin-crystalhd if it
happens to be installed and a video file is indexed. The blacklisting
code has been lifted from totem-video-thumbnailer.
src/tracker-extract/tracker-extract-gstreamer.c | 26 +++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index 889ca60..4e6e8dd 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -1468,6 +1468,32 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
G_MODULE_EXPORT gboolean
tracker_extract_module_init (GError **error)
{
+ /* Lifted from totem-video-thumbnailer */
+ const gchar *blacklisted[] = {
+ "vaapidecodebin",
+ "vaapidecode",
+ "vaapimpeg2dec",
+ "vaapih264dec",
+ "vaapivc1dec",
+ "vaapivp8dec",
+ "vaapivp9dec",
+ "vaapih265dec",
+ "bmcdec",
+ };
+ GstRegistry *registry;
+ guint i;
+
gst_init (NULL, NULL);
+ registry = gst_registry_get ();
+
+ for (i = 0; i < G_N_ELEMENTS (blacklisted); i++) {
+ GstPluginFeature *feature =
+ gst_registry_find_feature (registry,
+ blacklisted[i],
+ GST_TYPE_ELEMENT_FACTORY);
+ if (feature)
+ gst_registry_remove_feature (registry, feature);
+ }
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]