[gnome-network-displays] wfd: Fall back to basic codec if we couldn't parse it



commit c87e95d4dbb69830b0f22372b5f24b6800e83e42
Author: Benjamin Berg <bberg redhat com>
Date:   Thu Jan 7 12:54:34 2021 +0100

    wfd: Fall back to basic codec if we couldn't parse it
    
    This allows us to keep going even if the client is sending something we
    do not understand.

 src/wfd/wfd-client.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/wfd/wfd-client.c b/src/wfd/wfd-client.c
index 525c0fd..5ef36c0 100644
--- a/src/wfd/wfd-client.c
+++ b/src/wfd/wfd-client.c
@@ -133,7 +133,10 @@ wfd_client_select_codec_and_resolution (WfdClient *self, WfdH264ProfileFlags pro
         codec = item;
     }
 
-  self->params->selected_codec = wfd_video_codec_ref (codec);
+  if (codec)
+    self->params->selected_codec = wfd_video_codec_ref (codec);
+  else
+    g_warning ("No codec/resolution could be found, falling back to defaults!");
 
 #if 0
   /* The native resolution reported by some devices is just useless */


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