From e5d71e419b2ea393d554e49e8ba1177f86ce1b2c Mon Sep 17 00:00:00 2001 From: esaunders Date: Wed, 25 Sep 2019 17:30:05 -0400 Subject: [PATCH] Moved Gst.init() call out of constructor because it was conflicting with other glib initialization on Linux which ultimately caused Autopsy to crash. --- .../autopsy/contentviewers/MediaPlayerPanel.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/MediaPlayerPanel.java b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaPlayerPanel.java index 5e0c85e807..1b30c49ef4 100755 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/MediaPlayerPanel.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaPlayerPanel.java @@ -187,7 +187,6 @@ public class MediaPlayerPanel extends JPanel implements MediaFileViewer.MediaVie */ public MediaPlayerPanel() throws GstException, UnsatisfiedLinkError { initComponents(); - initGst(); customizeComponents(); } @@ -251,11 +250,6 @@ public class MediaPlayerPanel extends JPanel implements MediaFileViewer.MediaVie }; } - private void initGst() throws GstException, UnsatisfiedLinkError { - logger.log(Level.INFO, "Attempting initializing of gstreamer for video/audio viewing"); //NON-NLS - Gst.init(); - } - /** * Loads the file by spawning off a background task to handle file copying * and video component initializations. @@ -453,6 +447,12 @@ public class MediaPlayerPanel extends JPanel implements MediaFileViewer.MediaVie if(this.isCancelled()) { return; } + + // Initialize Gstreamer. It is safe to call this for every file. + // It was moved here from the constructor because having it happen + // earlier resulted in conflicts on Linux. + Gst.init(); + //Video is ready for playback. Create new components gstPlayBin = new PlayBin("VideoPlayer", tempFile.toURI()); //Configure event handling