rtspsrc: Fix accumulation of before-send signal return values
Since glib 2.62, the accumulated return values in RUN_CLEANUP override the accumulated return values in RUN_FIRST. Since:
- We have a default handler that always returns TRUE, and
- User handlers are only run in RUN_FIRST, and
- Our accumulator just takes the latest return value
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.
Merge request reports
Activity
added 1.18 Needs backport labels
- Resolved by Sebastian Dröge
assigned to @gstreamer-merge-bot
mentioned in commit nirbheek/gst-plugins-good@73fb107a
added 1 commit
- 73fb107a - rtspsrc: Fix accumulation of before-send signal return values
assigned to @nirbheek and unassigned @gstreamer-merge-bot
added 1 commit
- fdbfd00f - Update docs cache and fix before-send signal doc syntax
assigned to @gstreamer-merge-bot and unassigned @nirbheek
mentioned in commit nirbheek/gst-plugins-good@95ef0a1d
added 1 commit
- 95ef0a1d - Update docs cache and fix before-send signal doc syntax
mentioned in merge request !912 (merged)
mentioned in commit tpm/gst-plugins-good@cedef00d
mentioned in commit tpm/gst-plugins-good@0ed50434
added Backported into 1.18 label and removed Needs backport label
Merge Request for backport into 1.18 branch: !918 (merged) (target milestone: 1.18.5)
mentioned in merge request !918 (merged)
changed milestone to %1.19.1