0024-access_output-file-Add-error-dialog-for-write-open.patch 1.54 KB
Newer Older
1
From a869647a6e8479d9e5963ed19fffdf5a3961723d Mon Sep 17 00:00:00 2001
2 3
From: Soomin Lee <bubu@mikan.io>
Date: Mon, 1 Oct 2018 15:37:57 +0200
4
Subject: [PATCH 24/25] access_output: file: Add error dialog for write/open
5 6 7 8 9 10

---
 modules/access_output/file.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules/access_output/file.c b/modules/access_output/file.c
Soomin Lee's avatar
Soomin Lee committed
11
index fbefce0be8..45de0fc75e 100644
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
--- a/modules/access_output/file.c
+++ b/modules/access_output/file.c
@@ -88,6 +88,9 @@ static ssize_t Write( sout_access_out_t *p_access, block_t *p_buffer )
         {
             if (errno == EINTR)
                 continue;
+            if (errno == ENOSPC)
+                vlc_dialog_display_error(p_access, "record",
+                                         "An error occurred during recording. Error: %s", vlc_strerror_c(errno));
             block_ChainRelease (p_buffer);
             msg_Err( p_access, "cannot write: %s", vlc_strerror_c(errno) );
             return -1;
@@ -305,8 +308,13 @@ static int Open( vlc_object_t *p_this )
             if (fd != -1)
                 break;
             if (fd == -1)
+            {
                 msg_Err (p_access, "cannot create %s: %s", path,
                          vlc_strerror_c(errno));
+
+                vlc_dialog_display_error(p_access, "record",
+                                         "An error occurred during recording. Error: %s", vlc_strerror_c(errno));
+            }
             if (overwrite || errno != EEXIST)
                 break;
             flags &= ~O_EXCL;
-- 
39
2.20.1
40