Skip to content
Snippets Groups Projects

rtspsrc: Fix accumulation of before-send signal return values

  1. Mar 17, 2021
    • Nirbheek Chauhan's avatar
      Update docs cache and fix before-send signal doc syntax · 95ef0a1d
      Nirbheek Chauhan authored
      The docs for before-send were missing because of this
      
      Part-of: <!909>
      95ef0a1d
    • Nirbheek Chauhan's avatar
      rtspsrc: Fix accumulation of before-send signal return values · 73fb107a
      Nirbheek Chauhan authored
      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.
      
      Part-of: <!909>
      73fb107a
Loading