You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
2.0 KiB
45 lines
2.0 KiB
From 026f2ef961331f72fd0af03f9b9c3d1ada75fb33 Mon Sep 17 00:00:00 2001
|
|
Message-Id: <026f2ef961331f72fd0af03f9b9c3d1ada75fb33.1601374253.git.nicolas@videolabs.io>
|
|
In-Reply-To: <4b80ba0cb27cadee99cf18b8f13fd7d16f19066b.1601374253.git.nicolas@videolabs.io>
|
|
References: <4b80ba0cb27cadee99cf18b8f13fd7d16f19066b.1601374253.git.nicolas@videolabs.io>
|
|
From: Soomin Lee <bubu@mikan.io>
|
|
Date: Mon, 1 Oct 2018 15:37:57 +0200
|
|
Subject: [PATCH 4/8] access_output: file: Add error dialog for write/open
|
|
|
|
Message-Id: <b95a09a0bb9cb649ab7c8f0ac0034013dad55247.1593695247.git.thomas@gllm.fr>
|
|
Message-Id: <edf369375dd3937286034267c8a614f188fb51e4.1599040437.git.nicolas@videolabs.io>
|
|
---
|
|
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 ef4f2d18d1..55e4822b90 100644
|
|
--- a/modules/access_output/file.c
|
|
+++ b/modules/access_output/file.c
|
|
@@ -87,6 +87,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;
|
|
@@ -304,8 +307,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.25.1
|
|
|
|
|