rtspsrc: Fix accumulation of before-send signal return values
Compare changes
Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.
The migration is almost done, at least the rest should happen in the background. There are still a few technical difference between the old cluster and the new ones, and they are summarized in this issue. Please pay attention to the TL:DR at the end of the comment.
Since glib 2.62, the accumulated return values in RUN_CLEANUP override the accumulated return values in RUN_FIRST. Since:
We were discarding the return value from the user handler and always sending messages even if the user handler said not to. See https://gitlab.gnome.org/GNOME/glib/-/issues/2352 for more details.
This signal does not need RUN_CLEANUP or RUN_FIRST, so just change it to RUN_LAST so that it's emitted exactly once and accumulated once.
With this fix, this signal can now be used to intercept PAUSE when going to GST_STATE_NULL so that the server does a TEARDOWN (if necessary) and not a PAUSE, which will confuse other RTSP clients when playing shared media.