baseparse: Fixes to buffers extracted from adapter
-
baseparse: Add missing
gst_buffer_make_writable
When the subclass attempts to finish without an explicitout_buffer
, we take a buffer from our adapter. We need to make this buffer writable before copying the metadata.This led to data races such as in the following pipeline, which randomly messed up the buffer PTS:
gst-launch-1.0 -e audiotestsrc timestamp-offset=5555 num-buffers=100 \ ! opusenc ! tee name=t ! queue ! opusparse ! fakesink silent=0 \ t. ! queue ! opusparse ! fakesink silent=0 -v | grep '0000, dur'
-
baseparse: Reset metadata for reverse playback fragment buffers
Don't let the adapter leak uncontrollable values.