[totem/wip/hadess/missing-video-plugin-but-subs: 1/2] backend: Catch missing video plugin error



commit c196f45435116c5f83e3549191b63b3b7bfd43b7
Author: Bastien Nocera <hadess hadess net>
Date:   Mon May 6 13:49:43 2019 +0200

    backend: Catch missing video plugin error
    
    Catch possible missing video plugin errors when there is a supported
    subtitle track.
    
    The old behaviour was to show an error that read:
    "Can't play a text file without video or visualizations."
    instead of triggering a missing plugins dialogue.

 src/backend/bacon-video-widget.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index 5fe5c2e97..ea9602479 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -3964,7 +3964,8 @@ bvw_error_from_gst_error (BaconVideoWidget *bvw, GstMessage * err_msg)
   if (is_error (e, CORE, MISSING_PLUGIN) ||
       is_error (e, STREAM, CODEC_NOT_FOUND) ||
       is_error (e, STREAM, WRONG_TYPE) ||
-      is_error (e, STREAM, NOT_IMPLEMENTED)) {
+      is_error (e, STREAM, NOT_IMPLEMENTED) ||
+      (is_error (e, STREAM, FORMAT) && strstr (dbg, "no video pad or visualizations"))) {
     if (bvw->priv->missing_plugins != NULL) {
       gchar **descs, *msg = NULL;
       guint num;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]