From: Zeeshan Ali (Khattak) Date: Thu, 10 Dec 2009 18:04:08 +0000 (+0200) Subject: core: Use printf for creating TimeSeekRange string X-Git-Tag: RYGEL_0_5_0~134 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ba17eba9e13ff54ad513b294bf249bb014f15ee4;p=profile%2Fivi%2Frygel.git core: Use printf for creating TimeSeekRange string --- diff --git a/src/rygel/rygel-http-time-seek.vala b/src/rygel/rygel-http-time-seek.vala index a668989..970bab6 100644 --- a/src/rygel/rygel-http-time-seek.vala +++ b/src/rygel/rygel-http-time-seek.vala @@ -89,14 +89,11 @@ internal class Rygel.HTTPTimeSeek : Rygel.HTTPSeek { public override void add_response_headers () { // TimeSeekRange.dlna.org: npt=START_TIME-END_TIME/DURATION - var range = "npt="; double start = (double) this.start / SECOND; double stop = (double) this.stop / SECOND; double length = (double) this.length / SECOND; - range += start.to_string () + "-" + - stop.to_string () + "/" + - length.to_string (); + var range = "npt=%.2f-%.2f/%.2f".printf (start, stop, length); this.msg.response_headers.append ("TimeSeekRange.dlna.org", range); }