Subject: [bug#62467] [PATCH gnome-team v2 00/12] Update fundamental packages

From: Liliana Marie Prikler <[email-masked]>
Date: Sun, 02 Apr 2023 20:20:13 +0200

Am Sonntag, dem 02.04.2023 um 13:27 -0400 schrieb Raghav Gururajan:
> LilyP,
> 
> > With this series, everything up to inkscape builds.  The next big
> > step is building GStreamer.  For this, I'd like to bump Meson to
> > 1.0, but even then, there are some difficulties.  (I'm currently
> > struggling with an EBADF in gst-plugins-base.)
> 
> EBADE as in “Invalid exchange.” error?
EBADF as in invalid file descriptor.  I actually have a fix for that
locally already, attached below.

The bug is that GLib raises a warning here, which IIUC is the correct
thing to do (assuming EBADF to be a programming error rather than a
recoverable one).

Cheers
Index: gst-plugins-base-1.22.1/tests/check/libs/allocators.c
===================================================================
--- gst-plugins-base-1.22.1.orig/tests/check/libs/allocators.c
+++ gst-plugins-base-1.22.1/tests/check/libs/allocators.c
@@ -80,7 +80,7 @@ GST_START_TEST (test_fdmem)
 
   alloc = gst_fd_allocator_new ();
   fail_unless (alloc);
-  mem = gst_fd_allocator_alloc (alloc, fd, 10, GST_FD_MEMORY_FLAG_KEEP_MAPPED);
+  mem = gst_fd_allocator_alloc (alloc, fd, 10, GST_FD_MEMORY_FLAG_KEEP_MAPPED | GST_FD_MEMORY_FLAG_DONT_CLOSE);
 
   fail_unless (gst_memory_map (mem, &info, GST_MAP_READ));
   fail_unless (info.data[5] == '5');
@@ -95,7 +95,7 @@ GST_START_TEST (test_fdmem)
   gst_memory_unmap (mem, &info);
 
   gst_memory_unref (mem);
-  fail_unless (g_close (fd, NULL) == 0);
+  fail_unless (g_close (fd, NULL));
   gst_object_unref (alloc);
 }