diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2021-09-18 10:46:55 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2021-09-18 11:58:59 +0300 |
commit | f4613bfc072c2f8eda1e7c803bbc4788852f3117 (patch) | |
tree | 0dabd0f764fc376bd4e99e99aa0a1c113f8aef63 /text/json | |
parent | 484cad00cea9294e8c464e70fc999da5e51cf4eb (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.rs | 4 |
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)) { |