@@ -140,6 +140,10 @@
#include "qemu/guest-random.h"
#include "qemu/keyval.h"
+#ifdef CONFIG_GSTREAMER
+#include <gst/gst.h>
+#endif
+
#define MAX_VIRTIO_CONSOLES 1
typedef struct BlockdevOptionsQueueEntry {
@@ -2848,6 +2852,10 @@ void qemu_init(int argc, char **argv)
bool userconfig = true;
FILE *vmstate_dump_file = NULL;
+#ifdef CONFIG_GSTREAMER
+ gst_init(&argc, &argv);
+#endif
+
qemu_add_opts(&qemu_drive_opts);
qemu_add_drive_opts(&qemu_legacy_drive_opts);
qemu_add_drive_opts(&qemu_common_drive_opts);
@@ -4350,10 +4350,6 @@ int vnc_init_func(void *opaque, QemuOpts *opts, Error **errp)
Error *local_err = NULL;
char *id = (char *)qemu_opts_id(opts);
-#ifdef CONFIG_GSTREAMER
- gst_init(NULL, NULL);
-#endif
-
assert(id);
vnc_display_init(id, &local_err);
if (local_err) {
So that we can set --gst- options on the qemu command line. Signed-off-by: Dietmar Maurer <dietmar@proxmox.com> --- system/vl.c | 8 ++++++++ ui/vnc.c | 4 ---- 2 files changed, 8 insertions(+), 4 deletions(-)