[rygel/wip/phako/remove-warnings: 5/14] renderer-gst: Fix potential null access warning



commit 877a38380bbaf062be329a605e8177b72a579190
Author: Jens Georg <mail jensge org>
Date:   Thu Feb 13 22:29:09 2020 +0100

    renderer-gst: Fix potential null access warning

 src/librygel-renderer-gst/rygel-playbin-player.vala | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/librygel-renderer-gst/rygel-playbin-player.vala 
b/src/librygel-renderer-gst/rygel-playbin-player.vala
index 14cef6f1..1650ba00 100644
--- a/src/librygel-renderer-gst/rygel-playbin-player.vala
+++ b/src/librygel-renderer-gst/rygel-playbin-player.vala
@@ -301,12 +301,12 @@ public class Rygel.PlaybinPlayer : GLib.Object, Rygel.MediaPlayer {
 
     public double volume {
         get {
-            return (this.playbin as Audio.StreamVolume).get_volume
+            return ((Audio.StreamVolume) this.playbin).get_volume
                                         (Audio.StreamVolumeFormat.CUBIC);
         }
 
         set {
-            (this.playbin as Audio.StreamVolume).set_volume
+            ((Audio.StreamVolume) this.playbin).set_volume
                                         (Audio.StreamVolumeFormat.CUBIC, value);
             debug ("volume set to %f.", value);
         }
@@ -504,7 +504,7 @@ public class Rygel.PlaybinPlayer : GLib.Object, Rygel.MediaPlayer {
     private bool is_rendering_image () {
         dynamic Element typefind;
 
-        typefind = (this.playbin as Gst.Bin).get_by_name ("typefind");
+        typefind = ((Gst.Bin) this.playbin).get_by_name ("typefind");
         Caps caps = typefind.caps;
         unowned Structure structure = caps.get_structure (0);
 


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