Skip to content
Snippets Groups Projects

rtspsrc: Fix accumulation of before-send signal return values

All threads resolved!

Since glib 2.62, the accumulated return values in RUN_CLEANUP override the accumulated return values in RUN_FIRST. Since:

  1. We have a default handler that always returns TRUE, and
  2. User handlers are only run in RUN_FIRST, and
  3. 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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Sebastian Dröge resolved all threads

    resolved all threads

  • added 1 commit

    • 73fb107a - rtspsrc: Fix accumulation of before-send signal return values

    Compare with previous version

  • assigned to @nirbheek and unassigned @gstreamer-merge-bot

  • I couldn't merge this branch: CI failed!

  • added 1 commit

    • fdbfd00f - Update docs cache and fix before-send signal doc syntax

    Compare with previous version

  • assigned to @gstreamer-merge-bot and unassigned @nirbheek

  • added 1 commit

    • 95ef0a1d - Update docs cache and fix before-send signal doc syntax

    Compare with previous version

  • Sebastian Dröge mentioned in merge request !912 (merged)

    mentioned in merge request !912 (merged)

  • 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)

  • Tim-Philipp Müller mentioned in merge request !918 (merged)

    mentioned in merge request !918 (merged)

  • changed milestone to %1.19.1

  • Please register or sign in to reply
    Loading