mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 09:17:42 +00:00
Moved Gst.init() call out of constructor because it was conflicting with other glib initialization on Linux which ultimately caused Autopsy to crash.
This commit is contained in:
parent
379cfb9401
commit
e5d71e419b
@ -187,7 +187,6 @@ public class MediaPlayerPanel extends JPanel implements MediaFileViewer.MediaVie
|
|||||||
*/
|
*/
|
||||||
public MediaPlayerPanel() throws GstException, UnsatisfiedLinkError {
|
public MediaPlayerPanel() throws GstException, UnsatisfiedLinkError {
|
||||||
initComponents();
|
initComponents();
|
||||||
initGst();
|
|
||||||
customizeComponents();
|
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
|
* Loads the file by spawning off a background task to handle file copying
|
||||||
* and video component initializations.
|
* and video component initializations.
|
||||||
@ -453,6 +447,12 @@ public class MediaPlayerPanel extends JPanel implements MediaFileViewer.MediaVie
|
|||||||
if(this.isCancelled()) {
|
if(this.isCancelled()) {
|
||||||
return;
|
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
|
//Video is ready for playback. Create new components
|
||||||
gstPlayBin = new PlayBin("VideoPlayer", tempFile.toURI());
|
gstPlayBin = new PlayBin("VideoPlayer", tempFile.toURI());
|
||||||
//Configure event handling
|
//Configure event handling
|
||||||
|
Loading…
x
Reference in New Issue
Block a user