filesink: fix handling of non-existing paths with musl
authorTim-Philipp Müller <tim@centricular.com>
Mon, 2 May 2022 10:41:52 +0000 (11:41 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 2 May 2022 16:46:44 +0000 (16:46 +0000)
Fixes #1194

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2341>

subprojects/gstreamer/plugins/elements/gstfilesink.c

index 8802c6d..d5808fd 100644 (file)
@@ -153,6 +153,9 @@ gst_fopen (const gchar * filename, const gchar * mode, gboolean o_sync)
 
   fd = open (filename, flags, 0666);
 
+  if (fd < 0)
+    return NULL;
+
   retval = fdopen (fd, mode);
   return retval;
 #endif