[rygel/rygel-0-28] engine-gst: Fix serving of resources with unspecified length
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/rygel-0-28] engine-gst: Fix serving of resources with unspecified length
- Date: Sun, 7 Feb 2016 16:41:54 +0000 (UTC)
commit 38bf48f6140c5ef4265012346875508646ecd8e9
Author: Jens Georg <mail jensge org>
Date: Sun Feb 7 13:01:16 2016 +0100
engine-gst: Fix serving of resources with unspecified length
Signed-off-by: Jens Georg <mail jensge org>
.../gstreamer/rygel-gst-data-source.vala | 3 ++-
src/media-engines/gstreamer/rygel-gst-sink.vala | 7 ++++---
2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/media-engines/gstreamer/rygel-gst-data-source.vala
b/src/media-engines/gstreamer/rygel-gst-data-source.vala
index 393442a..864ae83 100644
--- a/src/media-engines/gstreamer/rygel-gst-data-source.vala
+++ b/src/media-engines/gstreamer/rygel-gst-data-source.vala
@@ -286,7 +286,8 @@ internal class Rygel.GstDataSource : Rygel.DataSource, GLib.Object {
} else if (this.seek is HTTPByteSeekRequest) {
var byte_seek = this.seek as HTTPByteSeekRequest;
if (byte_seek.range_length >= byte_seek.total_size) {
- // How/why would this happen?
+ // Can happen on (invalid) seeks on resources with unspecified
+ // size
return true;
}
diff --git a/src/media-engines/gstreamer/rygel-gst-sink.vala b/src/media-engines/gstreamer/rygel-gst-sink.vala
index c9828c4..65fe307 100644
--- a/src/media-engines/gstreamer/rygel-gst-sink.vala
+++ b/src/media-engines/gstreamer/rygel-gst-sink.vala
@@ -68,9 +68,10 @@ internal class Rygel.GstSink : Sink {
this.name = NAME;
this.frozen = false;
- if (this.offsets != null) {
- if (this.offsets is HTTPByteSeekRequest) {
- this.max_bytes = (this.offsets as HTTPByteSeekRequest).total_size;
+ if (this.offsets != null && this.offsets is HTTPByteSeekRequest) {
+ this.max_bytes = (this.offsets as HTTPByteSeekRequest).total_size;
+ if (this.max_bytes == -1) {
+ this.max_bytes = int64.MAX;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]