core: ensure gst_init_get_option_group not called when GST_DISABLE_OPTION_PARSING set

The --disable-option-parsing flag breaks applications that
assume gst_init_get_option_group() initializes GStreamer. The
gst_init_get_option_group() function returns NULL and does nothing
to initialize GStreamer in this case. The --disable-option-parsing is
meant only for specialized scenarios, and thus should never be set when
compiling an application that makes use of gst_init_get_option_group().

This adds an assertion that forbids called gst_init_get_option_group()
when GST_DISABLE_OPTION_PARSING is set.

See also issue #388.

Signed-off-by: W. Michael Petullo <mike@flyn.org>
34 jobs for !604 with option-parsing in 1 minute and 7 seconds (queued for 3 seconds)
latest detached
Status Job ID Name Coverage
  Build Docker
passed #4196743
alpine amd64 manifest builder docker

00:00:31

passed #4196742
android docker

00:00:39

passed #4196741
cerbero fedora amd64 docker

00:00:30

passed #4196740
fedora amd64 docker

00:00:45

passed #4196744
gst-indent amd64 docker

00:00:23

 
  Preparation
failed #4196746
gst indent

00:00:21

manual #4196745
manual
manifest
 
  Build
created #4196755
gstreamer
build cerbero cross-android universal
created #4196759
gst-ios-13.2
build cerbero cross-ios universal
created #4196756
gstreamer
build cerbero cross win32
created #4196757
gstreamer
build cerbero cross win64
created #4196754
gstreamer
build cerbero fedora x86_64
created #4196758
gst-macos-10.15
build cerbero macos x86_64
created #4196750
build clang fedora x86_64
created #4196753
1809 windows docker allowed to fail manual
build msys2
created #4196747
build nodebug fedora x86_64
created #4196748
build static fedora x86_64
created #4196749
build static nodebug fedora x86_64
created #4196751
1809 windows docker
build vs2017 amd64
created #4196752
1809 windows docker
build vs2017 x86
 
  Test
created #4196760
gstreamer
check fedora
created #4196761
gstreamer
integration testsuites fedora 1/4
created #4196762
gstreamer
integration testsuites fedora 2/4
created #4196763
gstreamer
integration testsuites fedora 3/4
created #4196764
gstreamer
integration testsuites fedora 4/4
created #4196769
gstreamer
valgrind bad
created #4196766
gstreamer
valgrind base
created #4196765
gstreamer
valgrind core
created #4196770
gstreamer
valgrind ges
created #4196767
gstreamer
valgrind good
created #4196768
gstreamer
valgrind ugly
 
  Integrate
created #4196771
cross-android universal examples
created #4196773
gst-ios-13.2
cross-ios universal examples
created #4196772
documentation
 
Name Stage Failure
failed
gst indent Preparation
+    "--gst-disable-segtrap", ARG_SEGTRAP_DISABLE}, {
+ "--gst-disable-registry-update", ARG_REGISTRY_UPDATE_DISABLE}, {
+ "--gst-disable-registry-fork", ARG_REGISTRY_FORK_DISABLE}, {
+ NULL}
};

gint val = 0, n;


style diverges, please run gst-indent first
ERROR: Job failed: exit code 1