Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package gstreamer-rtsp-server for 
openSUSE:Factory checked in at 2021-04-12 12:36:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gstreamer-rtsp-server (Old)
 and      /work/SRC/openSUSE:Factory/.gstreamer-rtsp-server.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gstreamer-rtsp-server"

Mon Apr 12 12:36:34 2021 rev:29 rq:883609 version:1.18.4

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/gstreamer-rtsp-server/gstreamer-rtsp-server.changes  
    2021-01-21 21:54:23.237770982 +0100
+++ 
/work/SRC/openSUSE:Factory/.gstreamer-rtsp-server.new.2401/gstreamer-rtsp-server.changes
    2021-04-12 12:39:25.729513255 +0200
@@ -1,0 +2,10 @@
+Wed Mar 31 16:21:16 UTC 2021 - Antonio Larrosa <alarr...@suse.com>
+
+- Update to version 1.18.4:
+  + rtspclientsink: fix deadlock on shutdown if no data has been
+    received yet
+  + rtspclientsink: fix leaks in unit tests
+  + rtsp-stream: avoid deadlock in send_func
+  + rtsp-client: cleanup transports during TEARDOWN
+
+-------------------------------------------------------------------

Old:
----
  gst-rtsp-server-1.18.3.tar.xz

New:
----
  gst-rtsp-server-1.18.4.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gstreamer-rtsp-server.spec ++++++
--- /var/tmp/diff_new_pack.TgxD1y/_old  2021-04-12 12:39:26.389514021 +0200
+++ /var/tmp/diff_new_pack.TgxD1y/_new  2021-04-12 12:39:26.389514021 +0200
@@ -20,7 +20,7 @@
 %define _name gst-rtsp-server
 
 Name:           gstreamer-rtsp-server
-Version:        1.18.3
+Version:        1.18.4
 Release:        0
 Summary:        GStreamer-based RTSP server library
 License:        LGPL-2.0-or-later

++++++ _service ++++++
--- /var/tmp/diff_new_pack.TgxD1y/_old  2021-04-12 12:39:26.409514045 +0200
+++ /var/tmp/diff_new_pack.TgxD1y/_new  2021-04-12 12:39:26.409514045 +0200
@@ -9,7 +9,7 @@
 <!--
     <param name="changesgenerate">enable</param>
 -->
-    <param name="revision">1.18.3</param>
+    <param name="revision">1.18.4</param>
     <param name="scm">git</param>
   </service>
   <service name="recompress" mode="disabled">

++++++ gst-rtsp-server-1.18.3.tar.xz -> gst-rtsp-server-1.18.4.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gst-rtsp-server-1.18.3/ChangeLog 
new/gst-rtsp-server-1.18.4/ChangeLog
--- old/gst-rtsp-server-1.18.3/ChangeLog        2021-01-13 22:12:06.000000000 
+0100
+++ new/gst-rtsp-server-1.18.4/ChangeLog        2021-03-15 18:49:54.000000000 
+0100
@@ -1,3 +1,87 @@
+=== release 1.18.4 ===
+
+2021-03-15 17:49:53 +0000  Tim-Philipp M??ller <t...@centricular.com>
+
+       * ChangeLog:
+       * NEWS:
+       * RELEASE:
+       * gst-rtsp-server.doap:
+       * meson.build:
+         Release 1.18.4
+
+2021-02-15 12:07:15 +0000  Tim-Philipp M??ller <t...@centricular.com>
+
+       * tests/check/gst/rtspclientsink.c:
+         tests: rtspclientsink: fix some leaks
+         Part-of: 
<https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/192>
+
+2021-02-15 12:26:30 +0000  Tim-Philipp M??ller <t...@centricular.com>
+
+       * gst/rtsp-sink/gstrtspclientsink.c:
+         rtspclientsink: mark cached caps as maybe-leaked to make leaks tracer 
happy
+         Part-of: 
<https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/192>
+
+2021-02-15 12:07:45 +0000  Tim-Philipp M??ller <t...@centricular.com>
+
+       * tests/check/gst/rtspclientsink.c:
+         rtspclientsink: add unit test for potential shutdown deadlock
+         Part-of: 
<https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/191>
+
+2021-02-15 12:01:34 +0000  Tim-Philipp M??ller <t...@centricular.com>
+
+       * gst/rtsp-sink/gstrtspclientsink.c:
+         rtspclientsink: fix deadlock on shutdown before preroll
+         Fixes 
https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/issues/130
+         Part-of: 
<https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/191>
+
+2021-02-01 12:16:46 +0100  Branko Subasic <bra...@axis.com>
+
+       * gst/rtsp-server/rtsp-stream.c:
+         rtsp-stream: avoid deadlock in send_func
+         Currently the send_func() runs in a thread of its own which is started
+         the first time we enter handle_new_sample(). It runs in an outer loop
+         until priv->continue_sending is FALSE, which happens when a TEARDOWN
+         request is received. We use a local variable, cont, which is 
initialized
+         to TRUE, meaning that we will always enter the outer loop, and at the
+         end of the outer loop we assign it the value of 
priv->continue_sending.
+         Within the outer loop there is an inner loop, where we wait to be
+         signaled when there is more data to send. The inner loop is exited 
when
+         priv->send_cookie has changed value, which it does when more data is
+         available or when a TEARDOWN has been received.
+         But if we get a TEARDOWN before send_func() is entered we will get 
stuck
+         in the inner loop because no one will increase priv->session_cookie
+         anymore.
+         By not entering the outer loop in send_func() if 
priv->continue_sending
+         is FALSE we make sure that we do not get stuck in send_func()'s inner
+         loop should we receive a TEARDOWN before the send thread has started.
+         Change-Id: I7338a0ea60ea435bb685f875965f5165839afa20
+         Part-of: 
<https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/188>
+
+2021-01-22 08:58:23 +0100  Branko Subasic <bra...@axis.com>
+
+       * gst/rtsp-server/rtsp-client.c:
+         rtsp-client: cleanup transports during TEARDOWN
+         When tunneling RTP over RTSP the stream transports are stored in a 
hash
+         table in the GstRTSPClientPrivate struct. They are used for, among 
other
+         things, mapping channel id to stream transports when receiving data 
from
+         the client. The stream tranports are created and added to the hash 
table
+         in handle_setup_request(), but unfortuately they are not removed in
+         handle_teardown_request(). This means that if the client sends data on
+         the RTSP connection after it has sent the TEARDOWN, which is often the
+         case when audio backchannel is enabled, handle_data() will still be 
able
+         to map the channel to a session transport and pass the data along to 
it.
+         Which eventually leads to a failing assert in 
gst_rtsp_stream_recv_rtp()
+         because the stream is no longer joined to a bin.
+         We avoid this by removing the stream transports from the hash table 
when
+         we handle the TEARDOWN request.
+         Part-of: 
<https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/186>
+
+2021-01-14 02:17:42 +0000  Tim-Philipp M??ller <t...@centricular.com>
+
+       * docs/gst_plugins_cache.json:
+       * meson.build:
+         Back to development
+
 === release 1.18.3 ===
 
 2021-01-13 21:12:06 +0000  Tim-Philipp M??ller <t...@centricular.com>
@@ -5,6 +89,7 @@
        * ChangeLog:
        * NEWS:
        * RELEASE:
+       * docs/gst_plugins_cache.json:
        * gst-rtsp-server.doap:
        * meson.build:
          Release 1.18.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gst-rtsp-server-1.18.3/NEWS 
new/gst-rtsp-server-1.18.4/NEWS
--- old/gst-rtsp-server-1.18.3/NEWS     2021-01-13 22:12:06.000000000 +0100
+++ new/gst-rtsp-server-1.18.4/NEWS     2021-03-15 18:49:54.000000000 +0100
@@ -2,13 +2,13 @@
 
 GStreamer 1.18.0 was originally released on 8 September 2020.
 
-The latest bug-fix release in the 1.18 series is 1.18.3 and was released
-on 13 January 2021.
+The latest bug-fix release in the 1.18 series is 1.18.4 and was released
+on 15 March 2021.
 
 See https://gstreamer.freedesktop.org/releases/1.18/ for the latest
 version of this document.
 
-Last updated: Wednesday 13 January 2021, 20:00 UTC (log)
+Last updated: Monday 15 March 2021, 13:00 UTC (log)
 
 Introduction
 
@@ -2717,6 +2717,168 @@
 -   List of Merge Requests applied in 1.18.3
 -   List of Issues fixed in 1.18.3
 
+1.18.4
+
+The fourth 1.18 bug-fix release (1.18.4) was released on 15 March 2021.
+
+This release only contains bugfixes and security fixes and it should be
+safe to update from 1.18.x.
+
+Highlighted bugfixes in 1.18.4
+
+-   important security fixes for ID3 tag reading, matroska and realmedia
+    parsing, and gst-libav audio decoding
+-   audiomixer, audioaggregator: input buffer handling fixes
+-   decodebin3: improve stream-selection message handling
+-   uridecodebin3: make ???caps??? property work
+-   wavenc: fix writing of INFO chunks in some cases
+-   v4l2: bt601 colorimetry, allow encoder resolution changes, fix
+    decoder frame rate negotiation
+-   decklinkvideosink: fix auto format detection, and fixes for 29.97fps
+    framerate output
+-   mpeg-2 video handling fixes when seeking
+-   avviddec: fix bufferpool negotiation and possible memory corruption
+    when changing resolution
+-   various stability, performance and reliability improvements
+-   memory leak fixes
+-   build fixes: rpicamsrc, qt overlay example, d3d11videosink on UWP
+
+gstreamer
+
+-   info: Don???t leak log function user_data if the debug system is
+    compiled out
+-   task: Use SetThreadDescription() Win32 API for setting thread names,
+    which preserves thread names in dump files.
+-   buffer, memory: Mark info in map functions as caller-allocates and
+    pass allocation params as const pointers where possible
+-   clock: define AUTO_CLEANUP_FREE_FUNC for GstClockID
+
+gst-plugins-base
+
+-   tag: id3v2: fix frame size check and potential invalid reads
+-   audio: Fix gst_audio_buffer_truncate() meta handling for
+    non-interleaved audio
+-   audioresample: respect buffer layout when draining
+-   audioaggregator: fix input_buffer ownership
+-   decodebin3: change stream selection message owner, so that the app
+    sends the stream-selection event to the right element
+-   rtspconnection: correct data_size when tunneled mode
+-   uridecodebin3: make caps property work
+-   video-converter: Don???t upsample invalid lines
+-   videodecoder: Fix racy critical when pool negotiation occurs during
+    flush
+-   video: Convert gst_video_info_to_caps() to take self as const ptr
+-   examples: added qt core dependency for qt overlay example
+
+gst-plugins-good
+
+-   matroskademux: header parsing fixes
+-   rpicamsrc: depend on posix threads and vchiq_arm to fix build on
+    raspios again
+-   wavenc: Fixed INFO chunk corruption, caused by odd sized data not
+    being padded
+-   wavpackdec: Add floating point format support to fix distortions in
+    some cases
+-   v4l2: recognize V4L2 bt601 colorimetry again
+-   v4l2videoenc: support resolution change stream encode
+-   v4l2h265codec: fix HEVC profile string issue
+-   v4l2object: Need keep same transfer as input caps
+-   v4l2videodec: Fix vp8 and vp9 streams can???t play on board with
+    vendor bsp
+-   v4l2videodec: fix src side frame rate negotiation
+
+gst-plugins-bad
+
+-   avwait: Don???t post messages with the mutex locked
+-   d3d11h264dec: Reconfigure decoder object on DPB size change and keep
+    track of actually configured DPB size
+-   dashsink: fix double unref of sinkpad caps
+-   decklinkvideosink: Use correct numerator for 29.97fps
+-   decklinkvideosink: fix auto format detection
+-   decklinksrc: Use a more accurate capture time
+-   d3d11videosink: Fix build error on UWP
+-   interlace: negotiation and buffer leak fixes
+-   mpegvideoparse: do not clip, so decoder receives data from keyframe
+    even if it???s before the segment start
+-   mpegtsparse: Fix switched DTS/PTS when set-timestamps=false
+-   nvh264sldec: Reopen decoder object if larger DPB size is required
+-   sdpsrc: fix double free if sdp is provided as string via the
+    property
+-   vulkan: Fix elements long name.
+
+gst-plugins-ugly
+
+-   rmdemux: Make sure we have enough data available when parsing
+    audio/video packets
+
+gst-libav
+
+-   avviddec: take the maximum of the height/coded_height
+-   viddec: don???t configure an incorrect buffer pool when receiving a
+    gap event
+-   audiodec: fix stack overflow in gst_ffmpeg_channel_layout_to_gst()
+
+gst-rtsp-server
+
+-   rtspclientsink: fix deadlock on shutdown if no data has been
+    received yet
+-   rtspclientsink: fix leaks in unit tests
+-   rtsp-stream: avoid deadlock in send_func
+-   rtsp-client: cleanup transports during TEARDOWN
+
+gstreamer-vaapi
+
+-   h264 encoder: append encoder exposure to aud
+-   postproc: Fix a problem of propose_allocation when passthrough
+-   glx: Iterate over FBConfig and select 8 bit color size
+
+gstreamer-sharp
+
+-   no changes
+
+gst-omx
+
+-   no changes
+
+gst-python
+
+-   no changes
+
+gst-editing-services
+
+-   group: Use proper group constructor
+
+gst-integration-testsuites
+
+-   no changes
+
+gst-build
+
+-   no changes
+
+Cerbero build tool and packaging changes in 1.18.4
+
+-   macOS: more BigSur fixes
+-   glib: Backport patch to set thread names on Windows 10
+
+Contributors to 1.18.4
+
+Alicia Boya Garc??a, Ashley Brighthope, Bing Song, Branko Subasic, Edward
+Hervey, Guillaume Desmottes, Haihua Hu, He Junyan, Hou Qi, Jan Alexander
+Steffens (heftig), Jeongki Kim, Jordan Petridis, Knobe, Kristofer
+Bj??rkstr??m, Marijn Suijten, Matthew Waters, Paul Goulpi??, Philipp Zabel,
+Rafa?? Dzi??giel, Sebastian Dr??ge, Seungha Yang, Staz M, St??phane Cerveau,
+Thibault Saunier, Tim-Philipp M??ller, V??ctor Manuel J??quez Leal, Vivia
+Nikolaidou, Vladimir Menshakov,
+
+??? and many others who have contributed bug reports, translations, sent
+suggestions or helped testing. Thank you all!
+
+List of merge requests and issues fixed in 1.18.4
+
+-   List of Merge Requests applied in 1.18.4
+-   List of Issues fixed in 1.18.4
+
 Schedule for 1.20
 
 Our next major feature release will be 1.20, and 1.19 will be the
@@ -2724,9 +2886,9 @@
 development of 1.19/1.20 will happen in the git master branch.
 
 The plan for the 1.20 development cycle is yet to be confirmed, but it
-is now expected that feature freeze will take place some time in
-January/February 2021, with the first 1.20 stable release hopefully
-around February/March 2021.
+is now expected that feature freeze will take place some time in April
+2021, with the first 1.20 stable release hopefully around April/May
+2021.
 
 1.20 will be backwards-compatible to the stable 1.18, 1.16, 1.14, 1.12,
 1.10, 1.8, 1.6, 1.4, 1.2 and 1.0 release series.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gst-rtsp-server-1.18.3/RELEASE 
new/gst-rtsp-server-1.18.4/RELEASE
--- old/gst-rtsp-server-1.18.3/RELEASE  2021-01-13 22:12:06.000000000 +0100
+++ new/gst-rtsp-server-1.18.4/RELEASE  2021-03-15 18:49:54.000000000 +0100
@@ -1,4 +1,4 @@
-This is GStreamer gst-rtsp-server 1.18.3.
+This is GStreamer gst-rtsp-server 1.18.4.
 
 The GStreamer team is thrilled to announce a new major feature release
 of your favourite cross-platform multimedia framework!
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gst-rtsp-server-1.18.3/docs/gst_plugins_cache.json 
new/gst-rtsp-server-1.18.4/docs/gst_plugins_cache.json
--- old/gst-rtsp-server-1.18.3/docs/gst_plugins_cache.json      2021-01-13 
22:12:06.000000000 +0100
+++ new/gst-rtsp-server-1.18.4/docs/gst_plugins_cache.json      2021-03-15 
18:49:54.000000000 +0100
@@ -321,7 +321,7 @@
                         "construct": false,
                         "construct-only": false,
                         "controllable": false,
-                        "default": "GStreamer/1.18.3",
+                        "default": "GStreamer/1.18.4",
                         "mutable": "null",
                         "readable": true,
                         "type": "gchararray",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gst-rtsp-server-1.18.3/gst/rtsp-server/rtsp-client.c 
new/gst-rtsp-server-1.18.4/gst/rtsp-server/rtsp-client.c
--- old/gst-rtsp-server-1.18.3/gst/rtsp-server/rtsp-client.c    2021-01-13 
22:12:06.000000000 +0100
+++ new/gst-rtsp-server-1.18.4/gst/rtsp-server/rtsp-client.c    2021-03-15 
18:49:54.000000000 +0100
@@ -1369,6 +1369,55 @@
   return TRUE;
 }
 
+/* The cleanup_transports function is called from handle_teardown_request() to
+ * remove any stream transports from the newly closed session that were added 
to
+ * priv->transports in handle_setup_request(). This is done to avoid forwarding
+ * data from the client on a channel that we just closed.
+ */
+static void
+cleanup_transports (GstRTSPClient * client, GPtrArray * transports)
+{
+  GstRTSPClientPrivate *priv = client->priv;
+  GstRTSPStreamTransport *stream_transport;
+  const GstRTSPTransport *rtsp_transport;
+  guint i;
+
+  GST_LOG_OBJECT (client, "potentially removing %u transports",
+      transports->len);
+
+  for (i = 0; i < transports->len; i++) {
+    stream_transport = g_ptr_array_index (transports, i);
+    if (stream_transport == NULL) {
+      GST_LOG_OBJECT (client, "stream transport %u is NULL, continue", i);
+      continue;
+    }
+
+    rtsp_transport = gst_rtsp_stream_transport_get_transport 
(stream_transport);
+    if (rtsp_transport == NULL) {
+      GST_LOG_OBJECT (client, "RTSP transport %u is NULL, continue", i);
+      continue;
+    }
+
+    /* priv->transport only stores transports where RTP is tunneled over RTSP 
*/
+    if (rtsp_transport->lower_transport == GST_RTSP_LOWER_TRANS_TCP) {
+      if (!g_hash_table_remove (priv->transports,
+              GINT_TO_POINTER (rtsp_transport->interleaved.min))) {
+        GST_WARNING_OBJECT (client,
+            "failed removing transport with key '%d' from priv->transports",
+            rtsp_transport->interleaved.min);
+      }
+      if (!g_hash_table_remove (priv->transports,
+              GINT_TO_POINTER (rtsp_transport->interleaved.max))) {
+        GST_WARNING_OBJECT (client,
+            "failed removing transport with key '%d' from priv->transports",
+            rtsp_transport->interleaved.max);
+      }
+    } else {
+      GST_LOG_OBJECT (client, "transport %u not RTP/RTSP, skip it", i);
+    }
+  }
+}
+
 static gboolean
 handle_teardown_request (GstRTSPClient * client, GstRTSPContext * ctx)
 {
@@ -1382,6 +1431,7 @@
   gint matched;
   gboolean keep_session;
   GstRTSPStatusCode sig_result;
+  GPtrArray *session_media_transports;
 
   if (!ctx->session)
     goto no_session;
@@ -1417,6 +1467,10 @@
     goto sig_failed;
   }
 
+  /* get a reference to the transports in the session media so we can clean up
+   * our priv->transports before returning */
+  session_media_transports = gst_rtsp_session_media_get_transports (sessmedia);
+
   /* we emit the signal before closing the connection */
   g_signal_emit (client, gst_rtsp_client_signals[SIGNAL_TEARDOWN_REQUEST],
       0, ctx);
@@ -1442,6 +1496,12 @@
   gst_rtsp_media_unlock (media);
   g_object_unref (media);
 
+  /* remove all transports that were present in the session media which we just
+   * unmanaged from the priv->transports array, so we do not try to handle data
+   * on channels that were just closed */
+  cleanup_transports (client, session_media_transports);
+  g_ptr_array_unref (session_media_transports);
+
   return TRUE;
 
   /* ERRORS */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gst-rtsp-server-1.18.3/gst/rtsp-server/rtsp-stream.c 
new/gst-rtsp-server-1.18.4/gst/rtsp-server/rtsp-stream.c
--- old/gst-rtsp-server-1.18.3/gst/rtsp-server/rtsp-stream.c    2021-01-13 
22:12:06.000000000 +0100
+++ new/gst-rtsp-server-1.18.4/gst/rtsp-server/rtsp-stream.c    2021-03-15 
18:49:54.000000000 +0100
@@ -2702,11 +2702,10 @@
 send_func (GstRTSPStream * stream)
 {
   GstRTSPStreamPrivate *priv = stream->priv;
-  gboolean cont = TRUE;
 
   g_mutex_lock (&priv->send_lock);
 
-  while (cont) {
+  while (priv->continue_sending) {
     int i;
     int idx = -1;
     guint cookie;
@@ -2732,10 +2731,9 @@
     g_mutex_unlock (&priv->lock);
 
     g_mutex_lock (&priv->send_lock);
-    while (cookie == priv->send_cookie) {
+    while (cookie == priv->send_cookie && priv->continue_sending) {
       g_cond_wait (&priv->send_cond, &priv->send_lock);
     }
-    cont = priv->continue_sending;
   }
 
   g_mutex_unlock (&priv->send_lock);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gst-rtsp-server-1.18.3/gst/rtsp-sink/gstrtspclientsink.c 
new/gst-rtsp-server-1.18.4/gst/rtsp-sink/gstrtspclientsink.c
--- old/gst-rtsp-server-1.18.3/gst/rtsp-sink/gstrtspclientsink.c        
2021-01-13 22:12:06.000000000 +0100
+++ new/gst-rtsp-server-1.18.4/gst/rtsp-sink/gstrtspclientsink.c        
2021-03-15 18:49:54.000000000 +0100
@@ -1071,6 +1071,8 @@
         goto out;
     }
 
+    GST_MINI_OBJECT_FLAG_SET (caps, GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED);
+
   out:
     g_once_init_leave (&ret, caps);
   }
@@ -4340,6 +4342,18 @@
   return res;
 }
 
+static gboolean
+gst_rtsp_client_sink_is_stopping (GstRTSPClientSink * sink)
+{
+  gboolean is_stopping;
+
+  GST_OBJECT_LOCK (sink);
+  is_stopping = sink->task == NULL;
+  GST_OBJECT_UNLOCK (sink);
+
+  return is_stopping;
+}
+
 static GstRTSPResult
 gst_rtsp_client_sink_record (GstRTSPClientSink * sink, gboolean async)
 {
@@ -4374,14 +4388,25 @@
    * parts yet. */
   gst_rtsp_client_sink_collect_streams (sink);
 
+  if (gst_rtsp_client_sink_is_stopping (sink)) {
+    GST_INFO_OBJECT (sink, "task stopped, shutting down");
+    return GST_RTSP_EINTR;
+  }
+
   g_mutex_lock (&sink->block_streams_lock);
   /* Wait for streams to be blocked */
-  while (sink->n_streams_blocked < g_list_length (sink->contexts)) {
+  while (sink->n_streams_blocked < g_list_length (sink->contexts)
+      && !gst_rtsp_client_sink_is_stopping (sink)) {
     GST_DEBUG_OBJECT (sink, "waiting for streams to be blocked");
     g_cond_wait (&sink->block_streams_cond, &sink->block_streams_lock);
   }
   g_mutex_unlock (&sink->block_streams_lock);
 
+  if (gst_rtsp_client_sink_is_stopping (sink)) {
+    GST_INFO_OBJECT (sink, "task stopped, shutting down");
+    return GST_RTSP_EINTR;
+  }
+
   /* Send announce, then setup for all streams */
   gst_sdp_message_init (&sink->cursdp);
   sdp = &sink->cursdp;
@@ -4921,6 +4946,10 @@
 
     gst_task_stop (task);
 
+    g_mutex_lock (&sink->block_streams_lock);
+    g_cond_broadcast (&sink->block_streams_cond);
+    g_mutex_unlock (&sink->block_streams_lock);
+
     /* make sure it is not running */
     GST_RTSP_STREAM_LOCK (sink);
     GST_RTSP_STREAM_UNLOCK (sink);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gst-rtsp-server-1.18.3/gst-rtsp-server.doap 
new/gst-rtsp-server-1.18.4/gst-rtsp-server.doap
--- old/gst-rtsp-server-1.18.3/gst-rtsp-server.doap     2021-01-13 
22:12:06.000000000 +0100
+++ new/gst-rtsp-server-1.18.4/gst-rtsp-server.doap     2021-03-15 
18:49:54.000000000 +0100
@@ -32,6 +32,16 @@
 
  <release>
   <Version>
+   <revision>1.18.4</revision>
+   <branch>1.18</branch>
+   <name></name>
+   <created>2021-03-15</created>
+   <file-release 
rdf:resource="https://gstreamer.freedesktop.org/src/gst-rtsp-server/gst-rtsp-server-1.18.4.tar.xz";
 />
+  </Version>
+ </release>
+
+ <release>
+  <Version>
    <revision>1.18.3</revision>
    <branch>1.18</branch>
    <name></name>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gst-rtsp-server-1.18.3/meson.build 
new/gst-rtsp-server-1.18.4/meson.build
--- old/gst-rtsp-server-1.18.3/meson.build      2021-01-13 22:12:06.000000000 
+0100
+++ new/gst-rtsp-server-1.18.4/meson.build      2021-03-15 18:49:54.000000000 
+0100
@@ -1,5 +1,5 @@
 project('gst-rtsp-server', 'c',
-  version : '1.18.3',
+  version : '1.18.4',
   meson_version : '>= 0.48',
   default_options : ['warning_level=1', 'buildtype=debugoptimized'])
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gst-rtsp-server-1.18.3/tests/check/gst/rtspclientsink.c 
new/gst-rtsp-server-1.18.4/tests/check/gst/rtspclientsink.c
--- old/gst-rtsp-server-1.18.3/tests/check/gst/rtspclientsink.c 2021-01-13 
22:12:06.000000000 +0100
+++ new/gst-rtsp-server-1.18.4/tests/check/gst/rtspclientsink.c 2021-03-15 
18:49:54.000000000 +0100
@@ -214,6 +214,7 @@
 
     gst_element_set_state (pipeline, GST_STATE_NULL);
     gst_object_unref (pipeline);
+    gst_object_unref (bus);
   }
 
   iterate ();
@@ -227,8 +228,57 @@
 
     g_signal_emit_by_name (G_OBJECT (server_sink), "pull-sample", &sample);
     GST_INFO ("%2d recv sample: %p", i, sample);
-    if (sample)
+    if (sample) {
       gst_sample_unref (sample);
+      sample = NULL;
+    }
+  }
+  gst_object_unref (server_sink);
+
+  /* clean up and iterate so the clean-up can finish */
+  stop_server ();
+  iterate ();
+}
+
+GST_END_TEST;
+
+/* Make sure we can shut down rtspclientsink while it's still waiting for
+ * the initial preroll data */
+GST_START_TEST (test_record_no_data)
+{
+
+  start_record_server ("( rtppcmadepay name=depay0 ! fakesink )");
+
+  /* Create an rtspclientsink and send some data */
+  {
+    gchar *uri = get_server_uri (test_port, TEST_MOUNT_POINT);
+    gchar *pipe_str;
+    GstMessage *msg;
+    GstElement *pipeline;
+    GstBus *bus;
+
+    pipe_str = g_strdup_printf ("appsrc caps=audio/x-alaw,rate=8000,channels=1"
+        " ! rtspclientsink name=sink location=%s", uri);
+    g_free (uri);
+
+    pipeline = gst_parse_launch (pipe_str, NULL);
+    g_free (pipe_str);
+
+    fail_unless (pipeline != NULL);
+
+    bus = gst_element_get_bus (pipeline);
+    fail_if (bus == NULL);
+
+    gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+    /* wait for a bit */
+    msg = gst_bus_poll (bus, GST_MESSAGE_EOS | GST_MESSAGE_ERROR,
+        500 * GST_MSECOND);
+    fail_unless (msg == NULL);
+
+    gst_element_set_state (pipeline, GST_STATE_NULL);
+    gst_object_unref (pipeline);
+    gst_object_unref (bus);
   }
 
   /* clean up and iterate so the clean-up can finish */
@@ -248,6 +298,7 @@
   tcase_add_checked_fixture (tc, setup, teardown);
   tcase_set_timeout (tc, 120);
   tcase_add_test (tc, test_record);
+  tcase_add_test (tc, test_record_no_data);
   return s;
 }
 

Reply via email to