Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package gstreamer-plugins-bad for 
openSUSE:Factory checked in at 2023-07-27 16:50:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gstreamer-plugins-bad (Old)
 and      /work/SRC/openSUSE:Factory/.gstreamer-plugins-bad.new.32662 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gstreamer-plugins-bad"

Thu Jul 27 16:50:26 2023 rev:148 rq:1100821 version:1.22.5

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/gstreamer-plugins-bad/gstreamer-plugins-bad.changes  
    2023-07-01 23:17:29.126056798 +0200
+++ 
/work/SRC/openSUSE:Factory/.gstreamer-plugins-bad.new.32662/gstreamer-plugins-bad.changes
   2023-07-27 16:50:44.269790309 +0200
@@ -1,0 +2,12 @@
+Tue Jul 25 11:09:02 UTC 2023 - Bjørn Lie <bjorn....@gmail.com>
+
+- Update to version 1.22.5:
+  + d3d11bufferpool: Fix heavy CPU usage in case of fixed-size pool
+  + jpegparser: jpegdecoder: Don't pollute bus and comply with spec
+  + plugins: fix compiler warnings with GLib >= 2.76
+  + webrtcbin: Prevent critical warning when creating an additional
+    data channel
+  + webrtcstats: Properly report IceCandidate type
+- Rebase reduce-required-meson.patch.
+
+-------------------------------------------------------------------

Old:
----
  gst-plugins-bad-1.22.4.tar.xz

New:
----
  gst-plugins-bad-1.22.5.tar.xz

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

Other differences:
------------------
++++++ gstreamer-plugins-bad.spec ++++++
--- /var/tmp/diff_new_pack.1GyRag/_old  2023-07-27 16:50:44.901793879 +0200
+++ /var/tmp/diff_new_pack.1GyRag/_new  2023-07-27 16:50:44.905793902 +0200
@@ -71,7 +71,7 @@
 %endif
 
 Name:           gstreamer-plugins-bad
-Version:        1.22.4
+Version:        1.22.5
 Release:        0
 Summary:        GStreamer Streaming-Media Framework Plug-Ins
 License:        LGPL-2.1-or-later

++++++ gst-plugins-bad-1.22.4.tar.xz -> gst-plugins-bad-1.22.5.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gst-plugins-bad-1.22.4/ChangeLog 
new/gst-plugins-bad-1.22.5/ChangeLog
--- old/gst-plugins-bad-1.22.4/ChangeLog        2023-06-20 18:48:28.867239500 
+0200
+++ new/gst-plugins-bad-1.22.5/ChangeLog        2023-07-20 16:26:15.236034400 
+0200
@@ -1,3 +1,103 @@
+=== release 1.22.5 ===
+
+2023-07-20 15:22:48 +0100  Tim-Philipp Müller <t...@centricular.com>
+
+       * NEWS:
+       * RELEASE:
+       * gst-plugins-bad.doap:
+       * meson.build:
+         Release 1.22.5
+
+2023-02-19 10:41:51 +0100  Víctor Manuel Jáquez Leal <vjaq...@igalia.com>
+
+       * gst/jpegformat/gstjpegparse.c:
+         jpegparse: Warn only malformed data in APP data.
+         It's only malformed data in APP when its length is less than 6 chars,
+         because it should have at least an id string. Otherwise, if the id 
string
+         is not handled, no warning is raised, only a debug message noticing 
it.
+         Part-of: 
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5053>
+
+2023-02-15 19:02:35 +0100  Víctor Manuel Jáquez Leal <vjaq...@igalia.com>
+
+       * gst/jpegformat/gstjpegparse.c:
+         jpegparse: Parse AVI1 tag in app0.
+         Part-of: 
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5053>
+
+2023-02-12 16:11:34 +0800  He Junyan <junyan...@intel.com>
+
+       * sys/va/gstjpegdecoder.c:
+         va: jpegdecoder: Do not check SOS state when parsing DRI marker.
+         According to spec, the JPEG_MARKER_DRI(Restart interval definition)
+         marker can come before the SOS marker. So we should not check the SOS
+         state when parsing the DRI marker.
+         Part-of: 
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5053>
+
+2023-07-11 21:41:46 +0200  Carlos Rafael Giani <crg7...@mailbox.org>
+
+       * meson.build:
+         gl: Take into account viv-fb vs. viv_fb naming in meson scripts
+         Part-of: 
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4959>
+
+2023-05-16 21:24:44 +1000  Matthew Waters <matt...@centricular.com>
+
+       * meson.build:
+         gl: provide a pkg-config/gir file for the viv-fb backend
+         Required to be able to generate coherent bindings for window system
+         specific APIs due to limitations in gobject-introspection.
+         Part-of: 
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4959>
+
+2023-03-26 16:40:28 +0100  Tim-Philipp Müller <t...@centricular.com>
+
+       * ext/teletextdec/gstteletextdec.c:
+       * sys/winks/gstksvideodevice.c:
+       * sys/winks/kshelpers.c:
+       * tools/gst-app-maker:
+         taglist, plugins: fix compiler warnings with GLib >= 2.76
+         Fix compiler warnings about not using the return value when
+         freeing the GString segment with g_string_free(.., FALSE):
+         ignoring return value of ‘g_string_free_and_steal’ declared with 
attribute ‘warn_unused_result’
+         which we get with newer GLib versions. These were all harmless.
+         Part-of: 
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5015>
+
+2023-06-27 05:09:49 +0900  Seungha Yang <seun...@centricular.com>
+
+       * gst-libs/gst/d3d11/gstd3d11bufferpool.cpp:
+       * tests/check/libs/d3d11memory.c:
+       * tests/check/meson.build:
+         d3d11bufferpool: Fix heavy CPU usage in case of fixed-size pool
+         There's no reason to release GstMemory manually at all.
+         If we do release GstMemory, corresponding GstBuffer will be
+         discarded by GstBufferPool baseclass because the size is changed
+         to zero.
+         Actual cause of heavy CPU usage in case of fixed-size pool
+         (i.e., decoder output buffer pool) and if we remove GstMemory from
+         GstBuffer is that GstBufferPool baseclass is doing busy wait in 
acquire_buffer()
+         for some reason. That needs to be investigated though, discarding
+         and re-alloc every GstBuffer is not ideal already.
+         Part-of: 
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4943>
+
+2023-07-10 12:03:25 +0100  Philippe Normand <ph...@igalia.com>
+
+       * ext/webrtc/gstwebrtcbin.c:
+       * tests/check/elements/webrtcbin.c:
+         webrtcbin: Prevent critical warning when creating an additional data 
channel
+         The max_channels value wasn't clamped to 65534 in all situations.
+         Part-of: 
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5012>
+
+2023-06-30 18:30:46 +0100  Philippe Normand <ph...@igalia.com>
+
+       * ext/webrtc/gstwebrtcstats.c:
+         webrtcstats: Properly report IceCandidate type
+         strcmp returns a positive value if s1 is greater than s2, while we 
actually
+         needed to check equality here.
+         Part-of: 
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4957>
+
+2023-06-20 19:10:38 +0100  Tim-Philipp Müller <t...@centricular.com>
+
+       * meson.build:
+         Back to development
+         Part-of: 
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4907>
+
 === release 1.22.4 ===
 
 2023-06-20 17:42:25 +0100  Tim-Philipp Müller <t...@centricular.com>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gst-plugins-bad-1.22.4/NEWS 
new/gst-plugins-bad-1.22.5/NEWS
--- old/gst-plugins-bad-1.22.4/NEWS     2023-06-20 18:42:25.000000000 +0200
+++ new/gst-plugins-bad-1.22.5/NEWS     2023-07-20 16:22:48.000000000 +0200
@@ -2,13 +2,13 @@
 
 GStreamer 1.22.0 was originally released on 23 January 2023.
 
-The latest bug-fix release in the stable 1.22 series is 1.22.4 and was
-released on 20 June 2023.
+The latest bug-fix release in the stable 1.22 series is 1.22.5 and was
+released on 20 July 2023.
 
 See https://gstreamer.freedesktop.org/releases/1.22/ for the latest
 version of this document.
 
-Last updated: Tuesday 20 June 2023, 16:30 UTC (log)
+Last updated: Thursday 20 July 2023, 12:00 UTC (log)
 
 Introduction
 
@@ -2008,6 +2008,187 @@
 -   List of Merge Requests applied in 1.22.4
 -   List of Issues fixed in 1.22.4
 
+1.22.5
+
+The fifth 1.22 bug-fix release (1.22.5) was released on 20 July 2023.
+
+This release only contains bugfixes and security fixes and it should be
+safe to update from 1.22.x.
+
+Highlighted bugfixes in 1.22.5
+
+-   Security fixes for the RealMedia demuxer
+-   vaapi decoders, postproc: Disable DMAbuf from caps negotiation to
+    fix garbled video in some cases
+-   decodebin3, playbin3, parsebin fixes, especially for stream
+    reconfiguration
+-   hlsdemux2: fix early seeking; don’t pass referer when updating
+    playlists; webvtt fixes
+-   gtk: Fix critical caused by pointer movement when stream is getting
+    ready
+-   qt6: Set sampler filtering method, fixes bad quality with qml6glsink
+    and gstqt6d3d11
+-   v4l2src: handle resolution change when buffers are copied
+-   videoflip: update orientation tag in auto mode
+-   video timecode: Add support for framerates lower than 1fps and
+    accept 119.88 (120/1.001) fps
+-   webrtcsink: fixes for x264enc and NVIDIA encoders
+-   cerbero: Pull ninja from system if possible, avoid spurious
+    bootstrap of cmake
+-   packages: Recipe updates for ffmpeg, libsoup, orc
+-   various bug fixes, memory leak fixes, and other stability and
+    reliability improvements
+
+gstreamer
+
+-   taglist, plugins: fix compiler warnings with GLib >= 2.76
+-   tracerutils: allow casting parameter types
+-   inputselector: fix playing variable is never set
+
+gst-plugins-base
+
+-   appsink: add missing make_writable call
+-   audioaggregator: Do not post message before being constructed
+-   decodebin3: Prevent a critical warning when reassigning output slots
+-   decodebin3: Fix slot input linking when the associated stream has
+    changed
+-   decodebin3: Remove spurious input locking during parsebin
+    reconfiguration
+-   urisourcebin: Set source element to READY before querying it
+-   gl/viv-fb: meson build updates
+-   plugins: fix compiler warnings with GLib >= 2.76
+-   subtitleoverlay: fix mutex error if sink caps is not video
+-   video: timecode: Add support for framerates lower than 1fps
+-   video: accept timecode of 119.88 (120/1.001) FPS
+-   video: cannot attach time code meta when frame rate is 119.88
+    (120000/1001)
+-   videodecoder: fix copying buffer metas
+
+gst-plugins-good
+
+-   adaptivedemux2: Fix early seeking
+-   hlsdemux2: Ensure processed webvtt ends with empty new line
+-   hlsdemux2: Don’t set a referer when updating playlists
+-   matroska: demux: Strip signal byte when encrypted
+-   rtspsrc: Fix crash when is-live=false
+-   gtk: Fix critical caused by pointer movement when stream is getting
+    ready
+-   qt6: Set sampler filtering method, fixes bad quality with qml6glsink
+    and gstqt6d3d11
+-   qtdemux: opus: set entry as sampled
+-   v4l2src: handle resolution change when buffers are copied
+-   v4l2videodec: Fix handling of initial gaps
+-   v4l2videodec: correctly register v4l2mpeg2dec
+-   v4l2videoenc: replace custom QUERY_CAPS handling with getcaps
+    callback
+-   videoflip: update orientation tag in auto mode
+-   videoflip: fix critical when tag list is not writable
+
+gst-plugins-bad
+
+-   d3d11bufferpool: Fix heavy CPU usage in case of fixed-size pool
+-   jpegparser: jpegdecoder: Don’t pollute bus and comply with spec
+-   plugins: fix compiler warnings with GLib >= 2.76
+-   webrtcbin: Prevent critical warning when creating an additional data
+    channel
+-   webrtcstats: Properly report IceCandidate type
+
+gst-plugins-ugly
+
+-   rmdemux: add some integer overflow checks
+
+gst-plugins-rs
+
+-   fallbackswitch: Change the threshold for trailing buffers
+-   fallbackswitch: Fix pad health calculation and notifies
+-   fmp4mux: Fix draining in chunk mode if keyframes are too late
+-   livesync: Wait for the end timestamp of the previous buffer before
+    looking at queue
+-   livesync: Improve EOS handling
+-   togglerecord: Clip segment before calculating timestamp/duration
+-   togglerecord: Error out if main stream buffer has no valid running
+    time
+-   webrtcsink: fix pipeline when input caps contain max-framerate
+-   webrtcsink: Configure only 4 threads for x264enc
+-   webrtcsink: Translate force-keyunit events to force-IDR action
+    signal for NVIDIA encoders
+-   webrtcsink: Set config-interval=-1 and aggregate-mode=zero-latency
+    on rtph264pay and rtph265pay
+-   webrtcsink: Set VP8/VP9 payloader based on payloader element factory
+    name
+-   webrtcink: Use correct property types for nvvideoconvert
+-   webrtc/signalling: fix race condition in message ordering
+-   videofx: Minimize dependencies of the image crate
+
+gst-libav
+
+-   No changes
+
+gst-rtsp-server
+
+-   No changes
+
+gstreamer-vaapi
+
+-   vaapidecode,vaapipostproc: Disable DMAbuf from caps negotiation.
+
+gstreamer-sharp
+
+-   No changes
+
+gst-omx
+
+-   No changes
+
+gst-python
+
+-   No changes
+
+gst-editing-services
+
+-   ges: some fixes for 32-bit systems
+-   ges, nle: Avoid setting state or sending query when constructing
+    objects
+
+gst-validate + gst-integration-testsuites
+
+-   No changes
+
+gst-examples
+
+-   No changes
+
+Development build environment
+
+-   No changes
+
+Cerbero build tool and packaging changes in 1.22.5
+
+-   Pull ninja from system if possible, avoid spurious bootstrap of
+    cmake
+-   ffmpeg: update to 5.0.3
+-   libsoup: update to 2.74.3
+-   orc: update to 0.4.34
+
+Contributors to 1.22.5
+
+Andoni Morales Alastruey, Bastien Nocera, Carlos Rafael Giani, David
+Craven, Doug Nazar, Edward Hervey, François Laignel, Guillaume
+Desmottes, He Junyan, Hou Qi, Jan Alexander Steffens (heftig), Jan
+Schmidt, Maksym Khomenko, Mathieu Duponchelle, Matthew Waters, Michael
+Olbrich, Michael Tretter, Nicolas Dufresne, Nirbheek Chauhan, Philippe
+Normand, Ruslan Khamidullin, Sebastian Dröge, Seungha Yang, Théo
+Maillart, Thibault Saunier, Tim-Philipp Müller, Víctor Manuel Jáquez
+Leal, Vivia Nikolaidou, Yatin Maan,
+
+… 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.22.5
+
+-   List of Merge Requests applied in 1.22.5
+-   List of Issues fixed in 1.22.5
+
 Schedule for 1.24
 
 Our next major feature release will be 1.24, and 1.23 will be the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gst-plugins-bad-1.22.4/RELEASE 
new/gst-plugins-bad-1.22.5/RELEASE
--- old/gst-plugins-bad-1.22.4/RELEASE  2023-06-20 18:42:25.000000000 +0200
+++ new/gst-plugins-bad-1.22.5/RELEASE  2023-07-20 16:22:48.000000000 +0200
@@ -1,4 +1,4 @@
-This is GStreamer gst-plugins-bad 1.22.4.
+This is GStreamer gst-plugins-bad 1.22.5.
 
 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-plugins-bad-1.22.4/ext/teletextdec/gstteletextdec.c 
new/gst-plugins-bad-1.22.5/ext/teletextdec/gstteletextdec.c
--- old/gst-plugins-bad-1.22.4/ext/teletextdec/gstteletextdec.c 2023-06-20 
18:42:25.000000000 +0200
+++ new/gst-plugins-bad-1.22.5/ext/teletextdec/gstteletextdec.c 2023-07-20 
16:22:48.000000000 +0200
@@ -874,9 +874,8 @@
     if (!g_strcmp0 (subs->str, ""))
       g_string_append (subs, "\n");
 
-    text = subs->str;
     size = subs->len + 1;
-    g_string_free (subs, FALSE);
+    text = g_string_free (subs, FALSE);
     g_strfreev (lines);
   } else {
     size = page->columns * page->rows;
@@ -935,6 +934,7 @@
   gchar **lines;
   GString *subs;
   guint start, stop, k;
+  gsize len;
   gint i, j;
 
   colors = (gchar **) g_malloc (sizeof (gchar *) * (rows + 1));
@@ -965,11 +965,11 @@
   }
 
   /* Allocate new buffer */
-  *buf = gst_buffer_new_wrapped (subs->str, subs->len + 1);
+  len = subs->len + 1;
+  *buf = gst_buffer_new_wrapped (g_string_free (subs, FALSE), len);
 
   g_strfreev (lines);
   g_strfreev (colors);
-  g_string_free (subs, FALSE);
   return GST_FLOW_OK;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gst-plugins-bad-1.22.4/ext/webrtc/gstwebrtcbin.c 
new/gst-plugins-bad-1.22.5/ext/webrtc/gstwebrtcbin.c
--- old/gst-plugins-bad-1.22.4/ext/webrtc/gstwebrtcbin.c        2023-06-20 
18:42:25.000000000 +0200
+++ new/gst-plugins-bad-1.22.5/ext/webrtc/gstwebrtcbin.c        2023-07-20 
16:22:48.000000000 +0200
@@ -7110,6 +7110,10 @@
     g_object_get (webrtc->priv->sctp_transport, "max-channels", &max_channels,
         NULL);
 
+    if (max_channels <= 0) {
+      max_channels = 65534;
+    }
+
     g_return_val_if_fail (id <= max_channels, NULL);
   }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gst-plugins-bad-1.22.4/ext/webrtc/gstwebrtcstats.c 
new/gst-plugins-bad-1.22.5/ext/webrtc/gstwebrtcstats.c
--- old/gst-plugins-bad-1.22.4/ext/webrtc/gstwebrtcstats.c      2023-06-20 
18:42:25.000000000 +0200
+++ new/gst-plugins-bad-1.22.5/ext/webrtc/gstwebrtcstats.c      2023-07-20 
16:22:48.000000000 +0200
@@ -581,9 +581,9 @@
       can->stream_id, can->ipaddr, can->port);
   stats = gst_structure_new_empty (id);
 
-  if (strcmp (candidate_tag, "local")) {
+  if (g_str_equal (candidate_tag, "local")) {
     type = GST_WEBRTC_STATS_LOCAL_CANDIDATE;
-  } else if (strcmp (candidate_tag, "remote")) {
+  } else if (g_str_equal (candidate_tag, "remote")) {
     type = GST_WEBRTC_STATS_REMOTE_CANDIDATE;
   } else {
     GST_WARNING_OBJECT (webrtc, "Invalid ice candidate tag: %s", 
candidate_tag);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gst-plugins-bad-1.22.4/gst/jpegformat/gstjpegparse.c 
new/gst-plugins-bad-1.22.5/gst/jpegformat/gstjpegparse.c
--- old/gst-plugins-bad-1.22.4/gst/jpegformat/gstjpegparse.c    2023-06-20 
18:42:25.000000000 +0200
+++ new/gst-plugins-bad-1.22.5/gst/jpegformat/gstjpegparse.c    2023-07-20 
16:22:48.000000000 +0200
@@ -50,6 +50,7 @@
  *  + APP3 -- meta (same as exif)
  *  + APP12 -- Photoshop Save for Web: Ducky / Picture info
  *  + APP13 -- Adobe IRB
+ *  + check for interlaced mjpeg
  */
 
 #ifdef HAVE_CONFIG_H
@@ -367,7 +368,7 @@
   guint16 xd, yd;
   guint8 unit, xt, yt;
 
-  if (seg->size < 14)           /* length of interesting data in APP0 */
+  if (seg->size < 6)            /* less than 6 means no id string */
     return FALSE;
 
   gst_byte_reader_init (&reader, seg->data + seg->offset, seg->size);
@@ -436,7 +437,21 @@
     return TRUE;
   }
 
-  return FALSE;
+  /* https://exiftool.org/TagNames/JPEG.html#AVI1 */
+  if (g_strcmp0 (id_str, "AVI1") == 0) {
+    /* polarity */
+    if (!gst_byte_reader_get_uint8 (&reader, &unit))
+      return FALSE;
+
+    /* TODO: update caps for interlaced MJPEG */
+    GST_DEBUG_OBJECT (parse, "MJPEG interleaved field: %d", unit);
+
+    return TRUE;
+  }
+
+  GST_DEBUG_OBJECT (parse, "Unhandled app0: %s", id_str);
+
+  return TRUE;
 }
 
 /* *INDENT-OFF* */
@@ -460,6 +475,9 @@
   const guint8 *data;
   gint i;
 
+  if (seg->size < 6)            /* less than 6 means no id string */
+    return FALSE;
+
   gst_byte_reader_init (&reader, seg->data + seg->offset, seg->size);
   gst_byte_reader_skip_unchecked (&reader, 2);
 
@@ -497,12 +515,15 @@
         gst_tag_list_unref (tags);
       } else {
         GST_INFO_OBJECT (parse, "failed to parse %s: %s", id_str, data);
+        return FALSE;
       }
     }
 
     return TRUE;
   }
 
+  GST_DEBUG_OBJECT (parse, "Unhandled app1: %s", id_str);
+
   return TRUE;
 }
 
@@ -513,7 +534,7 @@
   const gchar *id_str;
   guint8 transform;
 
-  if (seg->size < 12)           /* length of interesting data in APP14 */
+  if (seg->size < 6)            /* less than 6 means no id string */
     return FALSE;
 
   gst_byte_reader_init (&reader, seg->data + seg->offset, seg->size);
@@ -522,8 +543,10 @@
   if (!gst_byte_reader_get_string_utf8 (&reader, &id_str))
     return FALSE;
 
-  if (!g_str_has_prefix (id_str, "Adobe"))
-    return FALSE;
+  if (!g_str_has_prefix (id_str, "Adobe")) {
+    GST_DEBUG_OBJECT (parse, "Unhandled app14: %s", id_str);
+    return TRUE;
+  }
 
   /* skip version and flags */
   if (!gst_byte_reader_skip (&reader, 6))
@@ -568,13 +591,13 @@
     return FALSE;
 
   comment = get_utf8_from_data (data, size);
+  if (!comment)
+    return FALSE;
 
-  if (comment) {
-    GST_INFO_OBJECT (parse, "comment found: %s", comment);
-    gst_tag_list_add (get_tag_list (parse), GST_TAG_MERGE_REPLACE,
-        GST_TAG_COMMENT, comment, NULL);
-    g_free (comment);
-  }
+  GST_INFO_OBJECT (parse, "comment found: %s", comment);
+  gst_tag_list_add (get_tag_list (parse), GST_TAG_MERGE_REPLACE,
+      GST_TAG_COMMENT, comment, NULL);
+  g_free (comment);
 
   return TRUE;
 }
@@ -773,25 +796,25 @@
       case GST_JPEG_MARKER_COM:
         if (!gst_jpeg_parse_com (parse, &seg)) {
           GST_ELEMENT_WARNING (parse, STREAM, FORMAT,
-              ("Failed to parse com segment"), (NULL));
+              ("Failed to parse com segment"), ("Invalid data"));
         }
         break;
       case GST_JPEG_MARKER_APP0:
         if (!gst_jpeg_parse_app0 (parse, &seg)) {
           GST_ELEMENT_WARNING (parse, STREAM, FORMAT,
-              ("Failed to parse app0 segment"), (NULL));
+              ("Failed to parse app0 segment"), ("Invalid data"));
         }
         break;
       case GST_JPEG_MARKER_APP1:
         if (!gst_jpeg_parse_app1 (parse, &seg)) {
           GST_ELEMENT_WARNING (parse, STREAM, FORMAT,
-              ("Failed to parse app1 segment"), (NULL));
+              ("Failed to parse app1 segment"), ("Invalid data"));
         }
         break;
       case GST_JPEG_MARKER_APP14:
         if (!gst_jpeg_parse_app14 (parse, &seg)) {
           GST_ELEMENT_WARNING (parse, STREAM, FORMAT,
-              ("Failed to parse app14 segment"), (NULL));
+              ("Failed to parse app14 segment"), ("Invalid data"));
         }
         break;
       case GST_JPEG_MARKER_DHT:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gst-plugins-bad-1.22.4/gst-libs/gst/d3d11/gstd3d11bufferpool.cpp 
new/gst-plugins-bad-1.22.5/gst-libs/gst/d3d11/gstd3d11bufferpool.cpp
--- old/gst-plugins-bad-1.22.4/gst-libs/gst/d3d11/gstd3d11bufferpool.cpp        
2023-06-20 18:42:25.000000000 +0200
+++ new/gst-plugins-bad-1.22.5/gst-libs/gst/d3d11/gstd3d11bufferpool.cpp        
2023-07-20 16:22:48.000000000 +0200
@@ -50,7 +50,6 @@
   GstD3D11Allocator *alloc[GST_VIDEO_MAX_PLANES];
 
   GstD3D11AllocationParams *d3d11_params;
-  gboolean texture_array_pool;
 
   gint stride[GST_VIDEO_MAX_PLANES];
   gsize offset[GST_VIDEO_MAX_PLANES];
@@ -66,10 +65,6 @@
     GstStructure * config);
 static GstFlowReturn gst_d3d11_buffer_pool_alloc_buffer (GstBufferPool * pool,
     GstBuffer ** buffer, GstBufferPoolAcquireParams * params);
-static GstFlowReturn gst_d3d11_buffer_pool_acquire_buffer (GstBufferPool * 
pool,
-    GstBuffer ** buffer, GstBufferPoolAcquireParams * params);
-static void gst_d3d11_buffer_pool_reset_buffer (GstBufferPool * pool,
-    GstBuffer * buffer);
 static gboolean gst_d3d11_buffer_pool_start (GstBufferPool * pool);
 static gboolean gst_d3d11_buffer_pool_stop (GstBufferPool * pool);
 
@@ -84,8 +79,6 @@
   bufferpool_class->get_options = gst_d3d11_buffer_pool_get_options;
   bufferpool_class->set_config = gst_d3d11_buffer_pool_set_config;
   bufferpool_class->alloc_buffer = gst_d3d11_buffer_pool_alloc_buffer;
-  bufferpool_class->acquire_buffer = gst_d3d11_buffer_pool_acquire_buffer;
-  bufferpool_class->reset_buffer = gst_d3d11_buffer_pool_reset_buffer;
   bufferpool_class->start = gst_d3d11_buffer_pool_start;
   bufferpool_class->stop = gst_d3d11_buffer_pool_stop;
 
@@ -244,10 +237,6 @@
           max_buffers, max_array_size);
       max_buffers = max_array_size;
     }
-
-    priv->texture_array_pool = TRUE;
-  } else {
-    priv->texture_array_pool = FALSE;
   }
 
   offset = 0;
@@ -370,17 +359,10 @@
   GstFlowReturn ret = GST_FLOW_OK;
 
   buf = gst_buffer_new ();
-  /* In case of texture-array, we are releasing memory objects in
-   * the GstBufferPool::reset_buffer() so that GstD3D11Memory objects can be
-   * returned to the GstD3D11PoolAllocator. So, underlying GstD3D11Memory
-   * will be filled in the later GstBufferPool::acquire_buffer() call.
-   * Don't fill memory here for non-texture-array therefore */
-  if (!priv->texture_array_pool) {
-    ret = gst_d3d11_buffer_pool_fill_buffer (self, buf);
-    if (ret != GST_FLOW_OK) {
-      gst_buffer_unref (buf);
-      return ret;
-    }
+  ret = gst_d3d11_buffer_pool_fill_buffer (self, buf);
+  if (ret != GST_FLOW_OK) {
+    gst_buffer_unref (buf);
+    return ret;
   }
 
   gst_buffer_add_video_meta_full (buf, GST_VIDEO_FRAME_FLAG_NONE,
@@ -393,48 +375,6 @@
   return GST_FLOW_OK;
 }
 
-static GstFlowReturn
-gst_d3d11_buffer_pool_acquire_buffer (GstBufferPool * pool,
-    GstBuffer ** buffer, GstBufferPoolAcquireParams * params)
-{
-  GstD3D11BufferPool *self = GST_D3D11_BUFFER_POOL (pool);
-  GstD3D11BufferPoolPrivate *priv = self->priv;
-  GstFlowReturn ret;
-
-  ret = GST_BUFFER_POOL_CLASS (parent_class)->acquire_buffer (pool,
-      buffer, params);
-
-  if (ret != GST_FLOW_OK)
-    return ret;
-
-  /* Don't need special handling for non-texture-array case */
-  if (!priv->texture_array_pool)
-    return ret;
-
-  /* Baseclass will hold empty buffer in this case, fill GstMemory */
-  g_assert (gst_buffer_n_memory (*buffer) == 0);
-
-  return gst_d3d11_buffer_pool_fill_buffer (self, *buffer);
-}
-
-static void
-gst_d3d11_buffer_pool_reset_buffer (GstBufferPool * pool, GstBuffer * buffer)
-{
-  GstD3D11BufferPool *self = GST_D3D11_BUFFER_POOL (pool);
-  GstD3D11BufferPoolPrivate *priv = self->priv;
-
-  /* If we are using texture array, we should return GstD3D11Memory to
-   * to the GstD3D11PoolAllocator, so that the allocator can wake up
-   * if it's waiting for available memory object */
-  if (priv->texture_array_pool) {
-    GST_LOG_OBJECT (self, "Returning memory to allocator");
-    gst_buffer_remove_all_memory (buffer);
-  }
-
-  GST_BUFFER_POOL_CLASS (parent_class)->reset_buffer (pool, buffer);
-  GST_BUFFER_FLAGS (buffer) = 0;
-}
-
 static gboolean
 gst_d3d11_buffer_pool_start (GstBufferPool * pool)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gst-plugins-bad-1.22.4/gst-plugins-bad.doap 
new/gst-plugins-bad-1.22.5/gst-plugins-bad.doap
--- old/gst-plugins-bad-1.22.4/gst-plugins-bad.doap     2023-06-20 
18:42:25.000000000 +0200
+++ new/gst-plugins-bad-1.22.5/gst-plugins-bad.doap     2023-07-20 
16:22:48.000000000 +0200
@@ -35,6 +35,16 @@
 
  <release>
   <Version>
+   <revision>1.22.5</revision>
+   <branch>1.22</branch>
+   <name></name>
+   <created>2023-07-20</created>
+   <file-release 
rdf:resource="https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.22.5.tar.xz";
 />
+  </Version>
+ </release>
+
+ <release>
+  <Version>
    <revision>1.22.4</revision>
    <branch>1.22</branch>
    <name></name>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gst-plugins-bad-1.22.4/meson.build 
new/gst-plugins-bad-1.22.5/meson.build
--- old/gst-plugins-bad-1.22.4/meson.build      2023-06-20 18:42:25.000000000 
+0200
+++ new/gst-plugins-bad-1.22.5/meson.build      2023-07-20 16:22:48.000000000 
+0200
@@ -1,5 +1,5 @@
 project('gst-plugins-bad', 'c', 'cpp',
-  version : '1.22.4',
+  version : '1.22.5',
   meson_version : '>= 0.62',
   default_options : [ 'warning_level=1',
                       'buildtype=debugoptimized' ])
@@ -352,9 +352,12 @@
   message('GStreamer OpenGL platforms: @0@'.format(' '.join(gst_gl_platforms)))
   message('GStreamer OpenGL apis: @0@'.format(' '.join(gst_gl_apis)))
 
-  foreach ws : ['x11', 'wayland', 'android', 'cocoa', 'eagl', 'win32', 
'dispmanx', 'viv_fb']
+  foreach ws : ['x11', 'wayland', 'android', 'cocoa', 'eagl', 'win32', 
'dispmanx']
     set_variable('gst_gl_have_window_@0@'.format(ws), 
gst_gl_winsys.contains(ws))
   endforeach
+  # Handling viv-fb separately, because the winsys is called "viv-fb", but the
+  # variable suffix must be "viv_fb" (dashes are not allowed in variable 
names).
+  set_variable('gst_gl_have_window_viv_fb', gst_gl_winsys.contains('viv-fb'))
 
   foreach p : ['glx', 'egl', 'cgl', 'eagl', 'wgl']
     set_variable('gst_gl_have_platform_@0@'.format(p), 
gst_gl_platforms.contains(p))
@@ -380,6 +383,10 @@
     gstglegl_dep = dependency('gstreamer-gl-egl-1.0', version : gst_req,
         fallback : ['gst-plugins-base', 'gstglegl_dep'], required: true)
   endif
+  if gst_gl_have_window_viv_fb
+    gstglviv_fb_dep = dependency('gstreamer-gl-viv-fb-1.0', version : gst_req,
+        fallback : ['gst-plugins-base', 'gstglviv_fb_dep'], required: true)
+  endif
 endif
 
 libm = cc.find_library('m', required : false)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gst-plugins-bad-1.22.4/po/gst-plugins-bad-1.0.pot 
new/gst-plugins-bad-1.22.5/po/gst-plugins-bad-1.0.pot
--- old/gst-plugins-bad-1.22.4/po/gst-plugins-bad-1.0.pot       2023-06-20 
18:48:28.523238700 +0200
+++ new/gst-plugins-bad-1.22.5/po/gst-plugins-bad-1.0.pot       2023-07-20 
16:26:14.924029600 +0200
@@ -6,9 +6,9 @@
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad-1.22.4\n"
+"Project-Id-Version: gst-plugins-bad-1.22.5\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2023-06-20 17:48+0100\n"
+"POT-Creation-Date: 2023-07-20 15:26+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <l...@li.org>\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gst-plugins-bad-1.22.4/po/gst-plugins-bad.pot 
new/gst-plugins-bad-1.22.5/po/gst-plugins-bad.pot
--- old/gst-plugins-bad-1.22.4/po/gst-plugins-bad.pot   2023-06-20 
18:48:28.523238700 +0200
+++ new/gst-plugins-bad-1.22.5/po/gst-plugins-bad.pot   2023-07-20 
16:26:14.924029600 +0200
@@ -6,9 +6,9 @@
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad-1.22.4\n"
+"Project-Id-Version: gst-plugins-bad-1.22.5\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2023-06-20 17:48+0100\n"
+"POT-Creation-Date: 2023-07-20 15:26+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <l...@li.org>\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gst-plugins-bad-1.22.4/sys/va/gstjpegdecoder.c 
new/gst-plugins-bad-1.22.5/sys/va/gstjpegdecoder.c
--- old/gst-plugins-bad-1.22.4/sys/va/gstjpegdecoder.c  2023-06-20 
18:42:25.000000000 +0200
+++ new/gst-plugins-bad-1.22.5/sys/va/gstjpegdecoder.c  2023-07-20 
16:22:48.000000000 +0200
@@ -481,9 +481,10 @@
         break;
 
       case GST_JPEG_MARKER_DRI:
-        if (!(valid_state (priv->state, GST_JPEG_DECODER_STATE_GOT_SOS)
-                && decode_restart_interval (self, &seg)))
+        if (!decode_restart_interval (self, &seg)) {
+          GST_WARNING_OBJECT (self, "Fail to decode restart interval");
           goto unmap_and_error;
+        }
         break;
       case GST_JPEG_MARKER_DNL:
         break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gst-plugins-bad-1.22.4/sys/winks/gstksvideodevice.c 
new/gst-plugins-bad-1.22.5/sys/winks/gstksvideodevice.c
--- old/gst-plugins-bad-1.22.4/sys/winks/gstksvideodevice.c     2023-06-20 
18:42:25.000000000 +0200
+++ new/gst-plugins-bad-1.22.5/sys/winks/gstksvideodevice.c     2023-07-20 
16:22:48.000000000 +0200
@@ -237,8 +237,7 @@
           : "failed to retrieve system error message");
     }
 
-    *ret_error_str = message->str;
-    g_string_free (message, FALSE);
+    *ret_error_str = g_string_free (message, FALSE);
   }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gst-plugins-bad-1.22.4/sys/winks/kshelpers.c 
new/gst-plugins-bad-1.22.5/sys/winks/kshelpers.c
--- old/gst-plugins-bad-1.22.4/sys/winks/kshelpers.c    2023-06-20 
18:42:25.000000000 +0200
+++ new/gst-plugins-bad-1.22.5/sys/winks/kshelpers.c    2023-07-20 
16:22:48.000000000 +0200
@@ -383,7 +383,6 @@
 gchar *
 ks_options_flags_to_string (gulong flags)
 {
-  gchar *ret;
   GString *str;
 
   str = g_string_sized_new (128);
@@ -404,10 +403,7 @@
   if (flags != 0)
     g_string_append_printf (str, "|0x%08x", (guint) flags);
 
-  ret = str->str;
-  g_string_free (str, FALSE);
-
-  return ret;
+  return g_string_free (str, FALSE);
 }
 
 typedef struct
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gst-plugins-bad-1.22.4/tests/check/elements/webrtcbin.c 
new/gst-plugins-bad-1.22.5/tests/check/elements/webrtcbin.c
--- old/gst-plugins-bad-1.22.4/tests/check/elements/webrtcbin.c 2023-06-20 
18:42:25.000000000 +0200
+++ new/gst-plugins-bad-1.22.5/tests/check/elements/webrtcbin.c 2023-07-20 
16:22:48.000000000 +0200
@@ -2049,6 +2049,69 @@
 GST_END_TEST;
 
 static void
+signal_data_channel (struct test_webrtc *t,
+    GstElement * element, GObject * our, gpointer user_data)
+{
+  test_webrtc_signal_state_unlocked (t, STATE_CUSTOM);
+}
+
+GST_START_TEST (test_data_channel_create_two_channels)
+{
+  struct test_webrtc *t = test_webrtc_new ();
+  GObject *channel = NULL;
+  GObject *channel2 = NULL;
+  VAL_SDP_INIT (media_count, _count_num_sdp_media, GUINT_TO_POINTER (1), NULL);
+  VAL_SDP_INIT (offer, on_sdp_has_datachannel, NULL, &media_count);
+  gchar *label;
+  GstStructure *options = NULL;
+
+  t->on_negotiation_needed = NULL;
+  t->on_ice_candidate = NULL;
+  t->on_prepare_data_channel = have_prepare_data_channel;
+  t->on_data_channel = signal_data_channel;
+
+  fail_if (gst_element_set_state (t->webrtc1, GST_STATE_READY) ==
+      GST_STATE_CHANGE_FAILURE);
+  fail_if (gst_element_set_state (t->webrtc2, GST_STATE_READY) ==
+      GST_STATE_CHANGE_FAILURE);
+
+  g_signal_emit_by_name (t->webrtc1, "create-data-channel", "label", NULL,
+      &channel);
+  g_assert_nonnull (channel);
+  g_object_get (channel, "label", &label, NULL);
+  g_assert_cmpstr (label, ==, "label");
+  g_free (label);
+  g_object_unref (channel);
+
+  fail_if (gst_element_set_state (t->webrtc1, GST_STATE_PLAYING) ==
+      GST_STATE_CHANGE_FAILURE);
+  fail_if (gst_element_set_state (t->webrtc2, GST_STATE_PLAYING) ==
+      GST_STATE_CHANGE_FAILURE);
+
+  /* Wait SCTP transport creation */
+  test_validate_sdp_full (t, &offer, &offer, 1 << STATE_CUSTOM, FALSE);
+
+  /* Create another channel on an existing SCTP transport, forcing an ID that
+     should comply with the max-channels requiremennt, this should not raise a
+     critical warning, the id is beneath the required limits. */
+  options =
+      gst_structure_new ("options", "id", G_TYPE_INT, 2, "negotiated",
+      G_TYPE_BOOLEAN, TRUE, NULL);
+  g_signal_emit_by_name (t->webrtc1, "create-data-channel", "label2", options,
+      &channel2);
+  gst_structure_free (options);
+  g_assert_nonnull (channel2);
+  g_object_get (channel2, "label", &label, NULL);
+  g_assert_cmpstr (label, ==, "label2");
+  g_free (label);
+  g_object_unref (channel2);
+
+  test_webrtc_free (t);
+}
+
+GST_END_TEST;
+
+static void
 have_data_channel (struct test_webrtc *t, GstElement * element,
     GObject * our, gpointer user_data)
 {
@@ -5775,6 +5838,7 @@
     tcase_add_test (tc, test_msid);
     if (sctpenc && sctpdec) {
       tcase_add_test (tc, test_data_channel_create);
+      tcase_add_test (tc, test_data_channel_create_two_channels);
       tcase_add_test (tc, test_data_channel_remote_notify);
       tcase_add_test (tc, test_data_channel_transfer_string);
       tcase_add_test (tc, test_data_channel_transfer_data);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gst-plugins-bad-1.22.4/tests/check/libs/d3d11memory.c 
new/gst-plugins-bad-1.22.5/tests/check/libs/d3d11memory.c
--- old/gst-plugins-bad-1.22.4/tests/check/libs/d3d11memory.c   1970-01-01 
01:00:00.000000000 +0100
+++ new/gst-plugins-bad-1.22.5/tests/check/libs/d3d11memory.c   2023-07-20 
16:22:48.000000000 +0200
@@ -0,0 +1,233 @@
+/*
+ * GStreamer
+ * Copyright (C) 2023 Seungha Yang <seun...@centricular.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gst/gst.h>
+#include <gst/check/gstcheck.h>
+#include <gst/d3d11/gstd3d11.h>
+#include <gst/video/video.h>
+#include <string.h>
+
+static GstD3D11Device *device = NULL;
+static GQuark memory_tester_quark;
+
+static void
+setup_func (void)
+{
+  device = gst_d3d11_device_new (0, D3D11_CREATE_DEVICE_BGRA_SUPPORT);
+  fail_unless (GST_IS_D3D11_DEVICE (device));
+
+  memory_tester_quark = g_quark_from_static_string ("gst-d3d11-memory-tester");
+}
+
+static void
+teardown_func (void)
+{
+  gst_object_unref (device);
+}
+
+static void
+allocator_finalize_cb (gboolean * alloc_finalized)
+{
+  *alloc_finalized = TRUE;
+}
+
+GST_START_TEST (test_free_active_allocator)
+{
+  GstD3D11PoolAllocator *alloc;
+  GstMemory *mem = NULL;
+  gboolean ret;
+  GstFlowReturn flow_ret;
+  gboolean alloc_finalized = FALSE;
+  D3D11_TEXTURE2D_DESC desc;
+
+  memset (&desc, 0, sizeof (desc));
+
+  desc.Width = 16;
+  desc.Height = 16;
+  desc.MipLevels = 1;
+  desc.ArraySize = 1;
+  desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
+  desc.SampleDesc.Count = 1;
+  desc.SampleDesc.Quality = 0;
+  desc.Usage = D3D11_USAGE_DEFAULT;
+
+  alloc = gst_d3d11_pool_allocator_new (device, &desc);
+  fail_unless (alloc);
+
+  g_object_set_qdata_full (G_OBJECT (alloc), memory_tester_quark,
+      &alloc_finalized, (GDestroyNotify) allocator_finalize_cb);
+
+  /* inactive pool should return flusing */
+  flow_ret = gst_d3d11_pool_allocator_acquire_memory (alloc, &mem);
+  fail_unless (flow_ret == GST_FLOW_FLUSHING);
+  fail_if (mem);
+
+  ret = gst_d3d11_allocator_set_active (GST_D3D11_ALLOCATOR (alloc), TRUE);
+  fail_unless (ret);
+
+  flow_ret = gst_d3d11_pool_allocator_acquire_memory (alloc, &mem);
+  fail_unless (flow_ret == GST_FLOW_OK);
+  fail_unless (mem);
+
+  gst_object_unref (alloc);
+  /* Only memory should hold refcount at this moment */
+  fail_unless (G_OBJECT (alloc)->ref_count == 1);
+  fail_if (alloc_finalized);
+
+  /* allocator should be finalized as well */
+  gst_memory_unref (mem);
+  fail_unless (alloc_finalized);
+}
+
+GST_END_TEST;
+
+typedef struct
+{
+  GMutex lock;
+  GCond cond;
+  gboolean blocked;
+  GstBufferPool *pool;
+} UnblockTestData;
+
+static gpointer
+alloc_thread (UnblockTestData * data)
+{
+  GstBuffer *buffers[2];
+  GstBuffer *flush_buf = NULL;
+  GstFlowReturn ret;
+
+  g_mutex_lock (&data->lock);
+  ret = gst_buffer_pool_acquire_buffer (data->pool, &buffers[0], NULL);
+  fail_unless (ret == GST_FLOW_OK);
+
+  ret = gst_buffer_pool_acquire_buffer (data->pool, &buffers[1], NULL);
+  fail_unless (ret == GST_FLOW_OK);
+
+  /* below call will be blocked by buffer pool */
+  data->blocked = TRUE;
+  g_cond_signal (&data->cond);
+  g_mutex_unlock (&data->lock);
+
+  ret = gst_buffer_pool_acquire_buffer (data->pool, &flush_buf, NULL);
+  fail_unless (ret == GST_FLOW_FLUSHING);
+
+  gst_buffer_unref (buffers[0]);
+  gst_buffer_unref (buffers[1]);
+
+  return NULL;
+}
+
+GST_START_TEST (test_unblock_on_stop)
+{
+  GstStructure *config;
+  GstVideoInfo info;
+  GstCaps *caps;
+  GstD3D11AllocationParams *params;
+  UnblockTestData data;
+  GThread *thread;
+
+  data.blocked = FALSE;
+  g_mutex_init (&data.lock);
+  g_cond_init (&data.cond);
+
+  gst_video_info_set_format (&info, GST_VIDEO_FORMAT_NV12, 16, 16);
+  caps = gst_video_info_to_caps (&info);
+  fail_unless (caps);
+
+  data.pool = gst_d3d11_buffer_pool_new (device);
+  fail_unless (data.pool);
+
+  config = gst_buffer_pool_get_config (data.pool);
+  fail_unless (config);
+
+  params = gst_d3d11_allocation_params_new (device,
+      &info, GST_D3D11_ALLOCATION_FLAG_TEXTURE_ARRAY, 0, 0);
+  fail_unless (params);
+
+  params->desc[0].ArraySize = 2;
+
+  gst_buffer_pool_config_set_d3d11_allocation_params (config, params);
+  gst_d3d11_allocation_params_free (params);
+  gst_buffer_pool_config_set_params (config, caps, info.size, 0, 2);
+  gst_caps_unref (caps);
+
+  fail_unless (gst_buffer_pool_set_config (data.pool, config));
+  fail_unless (gst_buffer_pool_set_active (data.pool, TRUE));
+
+  thread = g_thread_new (NULL, (GThreadFunc) alloc_thread, &data);
+
+  g_mutex_lock (&data.lock);
+  while (!data.blocked)
+    g_cond_wait (&data.cond, &data.lock);
+  g_mutex_unlock (&data.lock);
+
+  /* Wait 1 second for the alloc thread to be actually blocked */
+  Sleep (1000);
+
+  fail_unless (gst_buffer_pool_set_active (data.pool, FALSE));
+  g_thread_join (thread);
+
+  gst_object_unref (data.pool);
+  g_mutex_clear (&data.lock);
+  g_cond_clear (&data.cond);
+}
+
+GST_END_TEST;
+
+static gboolean
+check_d3d11_device (void)
+{
+  GstD3D11Device *device;
+
+  device = gst_d3d11_device_new (0, D3D11_CREATE_DEVICE_BGRA_SUPPORT);
+  if (device) {
+    gst_object_unref (device);
+    return TRUE;
+  }
+
+  return FALSE;
+}
+
+static Suite *
+d3d11memory_suite (void)
+{
+  Suite *s;
+  TCase *tc_chain;
+
+  s = suite_create ("d3d11memory");
+  tc_chain = tcase_create ("general");
+
+  suite_add_tcase (s, tc_chain);
+  tcase_add_checked_fixture (tc_chain, setup_func, teardown_func);
+
+  if (!check_d3d11_device ())
+    return s;
+
+  tcase_add_test (tc_chain, test_free_active_allocator);
+  tcase_add_test (tc_chain, test_unblock_on_stop);
+
+  return s;
+}
+
+GST_CHECK_MAIN (d3d11memory);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gst-plugins-bad-1.22.4/tests/check/meson.build 
new/gst-plugins-bad-1.22.5/tests/check/meson.build
--- old/gst-plugins-bad-1.22.4/tests/check/meson.build  2023-06-20 
18:42:25.000000000 +0200
+++ new/gst-plugins-bad-1.22.5/tests/check/meson.build  2023-07-20 
16:22:48.000000000 +0200
@@ -101,6 +101,7 @@
   [['libs/vkimage.c'], not gstvulkan_dep.found(), [gstvulkan_dep]],
   [['libs/vkinstance.c'], not gstvulkan_dep.found(), [gstvulkan_dep]],
   [['libs/d3d11device.cpp'], not gstd3d11_dep.found(), [gstd3d11_dep]],
+  [['libs/d3d11memory.c'], not gstd3d11_dep.found(), [gstd3d11_dep]],
 ]
 
 # FIXME: unistd dependency, unstable or not tested yet on windows
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gst-plugins-bad-1.22.4/tools/gst-app-maker 
new/gst-plugins-bad-1.22.5/tools/gst-app-maker
--- old/gst-plugins-bad-1.22.4/tools/gst-app-maker      2023-06-20 
18:42:25.000000000 +0200
+++ new/gst-plugins-bad-1.22.5/tools/gst-app-maker      2023-07-20 
16:22:48.000000000 +0200
@@ -261,7 +261,7 @@
   if (verbose) g_print ("pipeline: %s\n", pipe_desc->str);
 
   pipeline = (GstElement *) gst_parse_launch (pipe_desc->str, &error);
-  g_string_free (pipe_desc, FALSE);
+  g_string_free (pipe_desc, TRUE);
 
   if (error) {
     g_print("pipeline parsing error: %s\n", error->message);

++++++ reduce-required-meson.patch ++++++
--- /var/tmp/diff_new_pack.1GyRag/_old  2023-07-27 16:50:46.809804660 +0200
+++ /var/tmp/diff_new_pack.1GyRag/_new  2023-07-27 16:50:46.813804683 +0200
@@ -1,10 +1,10 @@
-Index: gst-plugins-bad-1.22.4/meson.build
+Index: gst-plugins-bad-1.22.5/meson.build
 ===================================================================
---- gst-plugins-bad-1.22.4.orig/meson.build
-+++ gst-plugins-bad-1.22.4/meson.build
+--- gst-plugins-bad-1.22.5.orig/meson.build
++++ gst-plugins-bad-1.22.5/meson.build
 @@ -1,6 +1,6 @@
  project('gst-plugins-bad', 'c', 'cpp',
-   version : '1.22.4',
+   version : '1.22.5',
 -  meson_version : '>= 0.62',
 +  meson_version : '>= 0.61',
    default_options : [ 'warning_level=1',

Reply via email to