[rygel] core: Use printf for creating TimeSeekRange string
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [rygel] core: Use printf for creating TimeSeekRange string
- Date: Thu, 10 Dec 2009 18:08:37 +0000 (UTC)
commit ba17eba9e13ff54ad513b294bf249bb014f15ee4
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Thu Dec 10 20:04:08 2009 +0200
core: Use printf for creating TimeSeekRange string
src/rygel/rygel-http-time-seek.vala | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
---
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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]