mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-22 11:30:59 +00:00
Make some unnecessarily mutable variables immutable
This commit is contained in:
parent
950a7d5b0d
commit
1c997c171d
1 changed files with 4 additions and 4 deletions
|
@ -397,7 +397,7 @@ impl Demuxer {
|
||||||
let demuxer = element.get_impl().downcast_ref::<Demuxer>().unwrap();
|
let demuxer = element.get_impl().downcast_ref::<Demuxer>().unwrap();
|
||||||
|
|
||||||
let mut res = {
|
let mut res = {
|
||||||
let mut demuxer_impl = &mut demuxer.imp.lock().unwrap();
|
let demuxer_impl = &mut demuxer.imp.lock().unwrap();
|
||||||
|
|
||||||
gst_trace!(demuxer.cat, obj: &element, "Handling buffer {:?}", buffer);
|
gst_trace!(demuxer.cat, obj: &element, "Handling buffer {:?}", buffer);
|
||||||
|
|
||||||
|
@ -460,7 +460,7 @@ impl Demuxer {
|
||||||
gst_trace!(demuxer.cat, obj: &element, "Calling again");
|
gst_trace!(demuxer.cat, obj: &element, "Calling again");
|
||||||
|
|
||||||
res = {
|
res = {
|
||||||
let mut demuxer_impl = &mut demuxer.imp.lock().unwrap();
|
let demuxer_impl = &mut demuxer.imp.lock().unwrap();
|
||||||
match demuxer_impl.handle_buffer(&element, None) {
|
match demuxer_impl.handle_buffer(&element, None) {
|
||||||
Ok(res) => res,
|
Ok(res) => res,
|
||||||
Err(flow_error) => {
|
Err(flow_error) => {
|
||||||
|
@ -496,7 +496,7 @@ impl Demuxer {
|
||||||
|
|
||||||
match event.view() {
|
match event.view() {
|
||||||
EventView::Eos(..) => {
|
EventView::Eos(..) => {
|
||||||
let mut demuxer_impl = &mut demuxer.imp.lock().unwrap();
|
let demuxer_impl = &mut demuxer.imp.lock().unwrap();
|
||||||
|
|
||||||
gst_debug!(demuxer.cat, obj: &element, "End of stream");
|
gst_debug!(demuxer.cat, obj: &element, "End of stream");
|
||||||
match demuxer_impl.end_of_stream(&element) {
|
match demuxer_impl.end_of_stream(&element) {
|
||||||
|
@ -604,7 +604,7 @@ impl Demuxer {
|
||||||
gst_debug!(self.cat, obj: element, "Seeking to {:?}-{:?}", start, stop);
|
gst_debug!(self.cat, obj: element, "Seeking to {:?}-{:?}", start, stop);
|
||||||
|
|
||||||
let res = {
|
let res = {
|
||||||
let mut demuxer_impl = &mut self.imp.lock().unwrap();
|
let demuxer_impl = &mut self.imp.lock().unwrap();
|
||||||
|
|
||||||
match demuxer_impl.seek(element, start, stop) {
|
match demuxer_impl.seek(element, start, stop) {
|
||||||
Ok(res) => res,
|
Ok(res) => res,
|
||||||
|
|
Loading…
Reference in a new issue