Newer
Older
From 888741befdcf51ee78bd16897e05df5ece74c9a6 Mon Sep 17 00:00:00 2001
Message-Id: <888741befdcf51ee78bd16897e05df5ece74c9a6.1565083097.git.thomas@gllm.fr>
In-Reply-To: <f52a7bb426dfd0742df5efef0ff3f7673fd66145.1565083097.git.thomas@gllm.fr>
References: <f52a7bb426dfd0742df5efef0ff3f7673fd66145.1565083097.git.thomas@gllm.fr>
From: Soomin Lee <bubu@mikan.io>
Date: Mon, 1 Oct 2018 15:37:57 +0200
Subject: [PATCH 5/6] access_output: file: Add error dialog for write/open
8
9
10
11
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
39
40
41
42
43
---
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
index fbefce0be8..45de0fc75e 100644
--- 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;
--
2.20.1