[totem/wip/hadess/error-messages: 2/3] backend: Add error message when file is empty
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/wip/hadess/error-messages: 2/3] backend: Add error message when file is empty
- Date: Thu, 21 Feb 2019 13:00:10 +0000 (UTC)
commit 6ce432d5b6faffcb2c78e6b9596ac1a0e85adba4
Author: Bastien Nocera <hadess hadess net>
Date: Thu Feb 21 11:20:12 2019 +0100
backend: Add error message when file is empty
src/backend/bacon-video-widget.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index d61d99190..480e07b13 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -3859,7 +3859,6 @@ bvw_error_from_gst_error (BaconVideoWidget *bvw, GstMessage * err_msg)
/* FIXME:
* Unemitted errors:
* BVW_ERROR_DVD_ENCRYPTED
- * BVW_ERROR_EMPTY_FILE
* BVW_ERROR_BROKEN_FILE
*/
@@ -3934,6 +3933,12 @@ bvw_error_from_gst_error (BaconVideoWidget *bvw, GstMessage * err_msg)
goto done;
}
+ if (is_error (e, STREAM, TYPE_NOT_FOUND)) {
+ ret = g_error_new_literal (BVW_ERROR, BVW_ERROR_EMPTY_FILE,
+ _("The file you tried to play is an empty file."));
+ goto done;
+ }
+
if (e->domain == GST_RESOURCE_ERROR) {
ret = g_error_new_literal (BVW_ERROR, BVW_ERROR_FILE_GENERIC,
e->message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]