renderer-gst: Use source element for queries.
authorsiva <siva@orexel.com>
Fri, 20 Dec 2013 20:26:34 +0000 (13:26 -0700)
committerJens Georg <mail@jensge.org>
Tue, 14 Jan 2014 21:09:40 +0000 (22:09 +0100)
Fixes querying duration and position.

Fixes DLNA CTT : 7.3.157.8

https://bugzilla.gnome.org/show_bug.cgi?id=721824

src/librygel-renderer-gst/rygel-playbin-player.vala

index 129a4c1..dc659c7 100644 (file)
@@ -302,9 +302,9 @@ public class Rygel.Playbin.Player : GLib.Object, Rygel.MediaPlayer {
 
     public int64 duration {
         get {
-            int64 dur;
+            int64 dur=0;
 
-            if (this.playbin.query_duration (Format.TIME, out dur)) {
+            if (this.playbin.source.query_duration (Format.TIME, out dur)) {
                 return dur / Gst.USECOND;
             } else {
                 return 0;
@@ -328,7 +328,7 @@ public class Rygel.Playbin.Player : GLib.Object, Rygel.MediaPlayer {
         get {
             int64 pos;
 
-            if (this.playbin.query_position (Format.TIME, out pos)) {
+            if (this.playbin.source.query_position (Format.TIME, out pos)) {
                 return pos / Gst.USECOND;
             } else {
                 return 0;