After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 356910 - Basesrc gst_base_src_activate_push not calling base_src_stop in deactivate
Basesrc gst_base_src_activate_push not calling base_src_stop in deactivate
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.11
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2006-09-20 15:01 UTC by Antoine Tremblay
Modified: 2006-09-23 09:30 UTC
See Also:
GNOME target: ---
GNOME version: ---

Patch to add the gst_base_stop call (757 bytes, patch)
2006-09-20 15:01 UTC, Antoine Tremblay
committed Details | Review

Description Antoine Tremblay 2006-09-20 15:01:10 UTC
I found this after playing with udpsrc : while having udpsrc always in the playing state , deactivating and activating it's push mode. The basesrc  would not call the start fonction after one deactivate had been called. This was due to the IS_STARTED  flag that wasn't reset since base_src_stop wasn't called.

So here's a patch to add a base_src_stop call in the gst_base_src_activate_push fonction on activate == false. This should be in line with the logic to have a stop called each time a start is , and not change the behavior of gstreamer... note that   gst_base_src_activate_pull calls it...

Also important is that I call this after gst_base_src_deactivate this is due to gst_base_src_deactivate calling the unlock function of the derived class and thus permitting the loop fonction to return (in the case of udpsrc this fonction sends a stop command). Without this it will dealock.


Comment 1 Antoine Tremblay 2006-09-20 15:01:47 UTC
Created attachment 73088 [details] [review]
Patch to add the gst_base_stop call
Comment 2 Wim Taymans 2006-09-23 09:30:56 UTC
        Based on patch by: Antoine Tremblay <hexa00 at gmail dot com>

        * libs/gst/base/gstbasesrc.c:
        (gst_base_src_default_check_get_range), (gst_base_src_start),
        (gst_base_src_activate_push), (gst_base_src_activate_pull),
        Match _start/_stop calls in the activate functions. Remove redundant
        _stop call from the state change function. Fixes #356910.
        Turn failure DEBUG into ERROR.