Follow-up from "libs: audio: Fix gst_audio_buffer_truncate meta handling"
The following discussions from !1035 (merged) should be addressed:
-
@slomo started a discussion: Oh good, this is also wrong. If
trim==0
then it will keep duration, pts, etc. and it would be wrong. Iftrim!=0
then it would replace them all withGST_CLOCK_TIME_NONE
, which is not wrong but also not great. -
@slomo started a discussion: (+2 comments) ... and in this branch it uses
gst_buffer_make_writable()
so would always preserve the old pts, duration, etc. and those would usually be wrong unlesstrim==0
andsamples==orig_samples
.So there's a bit more to fix here, but your change is definitely correct :)
Also this wouldn't have compiled in Rust