diff options
author | Bastien Nocera <hadess@hadess.net> | 2019-02-21 11:20:12 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2019-02-21 11:20:12 +0100 |
commit | 6ce432d5b6faffcb2c78e6b9596ac1a0e85adba4 (patch) | |
tree | 8092f05ae56889ed3eacebc5686b6166dc19449f /src | |
parent | 8caf2db4d1edcde723f4900efaf49124f4ab7284 (diff) | |
download | totem-6ce432d5b6faffcb2c78e6b9596ac1a0e85adba4.tar.gz |
backend: Add error message when file is empty
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/bacon-video-widget.c | 7 |
1 files changed, 6 insertions, 1 deletions
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); |