mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-02-20 22:56:20 +00:00
json: Don't needlessly create a full-range subslice of a slice
This commit is contained in:
parent
9d359d9341
commit
f8adb42f7b
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ fn test_enc() {
|
|||
h.set_src_caps_str("application/x-json, format=test");
|
||||
|
||||
let buf = {
|
||||
let mut buf = gst::Buffer::from_mut_slice(Vec::from(&input[..]));
|
||||
let mut buf = gst::Buffer::from_mut_slice(Vec::from(input));
|
||||
let buf_ref = buf.get_mut().unwrap();
|
||||
buf_ref.set_pts(gst::ClockTime::from_seconds(0));
|
||||
buf_ref.set_duration(gst::ClockTime::from_seconds(2));
|
||||
|
|
Loading…
Reference in a new issue