GNOME Bugzilla – Bug 356910
Basesrc gst_base_src_activate_push not calling base_src_stop in deactivate
Last modified: 2006-09-23 09:30:56 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.
Created attachment 73088 [details] [review]
Patch to add the gst_base_stop call
Based on patch by: Antoine Tremblay <hexa00 at gmail dot com>
Match _start/_stop calls in the activate functions. Remove redundant
_stop call from the state change function. Fixes #356910.
Turn failure DEBUG into ERROR.