• Daniel Drake's avatar
    deviceprovider: fix counting number of times started · e0c9b045
    Daniel Drake authored
    GstDeviceProvider has a started_count private variable counter,
    and the gst_device_provider_start() documentation emphasizes the
    importance of balancing the start and stop calls.
    
    However, when starting a provider that is already started, the
    current code will never increment the counter more than once.
    
    So you start it twice, but it will have start_count 1, which is the
    maximum value it will ever see.
    
    Then when you stop it twice, on the 2nd stop, after decrementing the
    counter in gst_device_provider_stop():
    
      else if (provider->priv->started_count < 1) {
        g_critical
            ("Trying to stop a GstDeviceProvider %s which is already stopped",
            GST_OBJECT_NAME (provider));
    
    and the program is killed.
    
    Fix this by incrementing the counter when starting a device provider that
    was already started.
    e0c9b045
Name
Last commit
Last update
common @ 59cb6781 Loading commit data...
data Loading commit data...
docs Loading commit data...
gst Loading commit data...
hooks Loading commit data...
libs Loading commit data...
m4 Loading commit data...
pkgconfig Loading commit data...
plugins Loading commit data...
po Loading commit data...
scripts Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
.gitmodules Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
ChangeLog Loading commit data...
MAINTAINERS Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
README.static-linking Loading commit data...
RELEASE Loading commit data...
TODO Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
gst-element-check-1.0.m4 Loading commit data...
gstreamer.doap Loading commit data...
meson.build Loading commit data...
meson_options.txt Loading commit data...
stamp.h.in Loading commit data...