Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sdroege/gst-plugin-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/text/json
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2021-09-18 10:46:55 +0300
committerSebastian Dröge <sebastian@centricular.com>2021-09-18 11:58:59 +0300
commitf4613bfc072c2f8eda1e7c803bbc4788852f3117 (patch)
tree0dabd0f764fc376bd4e99e99aa0a1c113f8aef63 /text/json
parent484cad00cea9294e8c464e70fc999da5e51cf4eb (diff)
Use Buffer::from_mut_slice() in more places
This allows downstream to map the memory mutable.
Diffstat (limited to 'text/json')
-rw-r--r--text/json/src/jsongstparse/imp.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/text/json/src/jsongstparse/imp.rs b/text/json/src/jsongstparse/imp.rs
index 78289922..c3331c7f 100644
--- a/text/json/src/jsongstparse/imp.rs
+++ b/text/json/src/jsongstparse/imp.rs
@@ -257,10 +257,10 @@ impl JsonGstParse {
);
if !seeking {
- let data = data.to_string().clone();
+ let data = data.to_string();
let mut events = state.create_events(element);
- let mut buffer = gst::Buffer::from_slice(data);
+ let mut buffer = gst::Buffer::from_mut_slice(data.into_bytes());
if let Some(last_position) = state.last_position {
if let Some(duration) = pts.map(|pts| pts.checked_sub(last_position)) {