From d7435f4b04df0948db4c1592642fc6b88553c107 Mon Sep 17 00:00:00 2001 From: "Zeeshan Ali (Khattak)" Date: Sat, 9 Apr 2011 01:37:36 +0300 Subject: [PATCH] core: Don't ask Gst to handle HTTPByteSeek.stop - Seems pipeline takes a very long time to playing state if we set the stop bit. - HTTPGstSink doesn't let more bytes flow than requested anyways. An issue in here is that pipeline will keep rolling now even after the requested byte segment has been sent to the client. This issue however should not realize since every decent client will abort the request immediately after it has been satisfied and we stop/destroy the pipeline when that happens. --- src/rygel/rygel-http-gst-response.vala | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/rygel/rygel-http-gst-response.vala b/src/rygel/rygel-http-gst-response.vala index a6efffc..c204842 100644 --- a/src/rygel/rygel-http-gst-response.vala +++ b/src/rygel/rygel-http-gst-response.vala @@ -197,19 +197,17 @@ internal class Rygel.HTTPGstResponse : Rygel.HTTPResponse { } private bool perform_seek () { - Gst.SeekType stop_type; + var stop_type = Gst.SeekType.NONE; Format format; if (this.seek is HTTPTimeSeek) { format = Format.TIME; - } else { - format = Format.BYTES; - } - if (this.seek.stop > 0) { - stop_type = Gst.SeekType.SET; + if (this.seek.stop > 0) { + stop_type = Gst.SeekType.SET; + } } else { - stop_type = Gst.SeekType.NONE; + format = Format.BYTES; } if (!this.pipeline.seek (1.0, -- 2.7.4