[rygel/wip/phako/remove-warnings: 8/14] engine-gst: Fix potential null access warnings
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/wip/phako/remove-warnings: 8/14] engine-gst: Fix potential null access warnings
- Date: Thu, 13 Feb 2020 23:44:57 +0000 (UTC)
commit 9f876b979dcbc642c57a7274dcd4150c3f3525e6
Author: Jens Georg <mail jensge org>
Date: Thu Feb 13 23:34:07 2020 +0100
engine-gst: Fix potential null access warnings
src/media-engines/gstreamer/rygel-gst-sink.vala | 2 +-
src/media-engines/gstreamer/rygel-gst-transcoder.vala | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/media-engines/gstreamer/rygel-gst-sink.vala b/src/media-engines/gstreamer/rygel-gst-sink.vala
index 3bff4d52..a6f9149b 100644
--- a/src/media-engines/gstreamer/rygel-gst-sink.vala
+++ b/src/media-engines/gstreamer/rygel-gst-sink.vala
@@ -69,7 +69,7 @@ internal class Rygel.GstSink : Sink {
this.frozen = false;
if (this.offsets != null && this.offsets is HTTPByteSeekRequest) {
- this.max_bytes = (this.offsets as HTTPByteSeekRequest).total_size;
+ this.max_bytes = ((HTTPByteSeekRequest) this.offsets).total_size;
if (this.max_bytes == -1) {
this.max_bytes = int64.MAX;
}
diff --git a/src/media-engines/gstreamer/rygel-gst-transcoder.vala
b/src/media-engines/gstreamer/rygel-gst-transcoder.vala
index 8920109a..8f999374 100644
--- a/src/media-engines/gstreamer/rygel-gst-transcoder.vala
+++ b/src/media-engines/gstreamer/rygel-gst-transcoder.vala
@@ -95,7 +95,7 @@ internal abstract class Rygel.GstTranscoder : GLib.Object {
// Retrieve the duration from primary media resource
if (item is AudioItem) {
- res.duration = (item as AudioItem).duration;
+ res.duration = ((AudioItem) item).duration;
}
return res;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]