[gnome-sound-recorder] remove bus watch after stop recording
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sound-recorder] remove bus watch after stop recording
- Date: Sat, 6 Jun 2020 07:03:35 +0000 (UTC)
commit c2625e960e363116972b871ac4edc79145c1f738
Author: Kavan Mevada <kavanmevada gmail com>
Date: Wed Jun 3 20:03:06 2020 +0530
remove bus watch after stop recording
src/record.js | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/record.js b/src/record.js
index 9713dbb..4e60cb4 100644
--- a/src/record.js
+++ b/src/record.js
@@ -97,7 +97,7 @@ var Record = new GObject.registerClass({
this.pipeline = new Gst.Pipeline({ name: 'pipe' });
this.srcElement = Gst.ElementFactory.make('pulsesrc', 'srcElement');
this.audioConvert = Gst.ElementFactory.make('audioconvert', 'audioConvert');
- this.caps = Gst.Caps.from_string(`audio/x-raw, channels=${this._getChannels()}`);
+ this.caps = Gst.Caps.from_string(`audio/x-raw`);
this.level = Gst.ElementFactory.make('level', 'level');
this.volume = Gst.ElementFactory.make('volume', 'volume');
this.ebin = Gst.ElementFactory.make('encodebin', 'ebin');
@@ -166,8 +166,11 @@ var Record = new GObject.registerClass({
this.timeout = null;
}
- this.recordBus.remove_watch();
- this.recordBus = null;
+ if (this.recordBus) {
+ this.recordBus.remove_watch();
+ this.recordBus = null;
+ }
+
this.duration = 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]