unref buffers going to analyser at the right time
This unrefs the buffer after the last chunk is pulled from it.
This commit is contained in:
parent
e8c2b4b267
commit
3be48f8f44
@ -317,6 +317,11 @@ void GstEngine::UpdateScope(int chunk_length) {
|
||||
memcpy(dest, source, bytes);
|
||||
|
||||
gst_buffer_unmap(latest_buffer_, &map);
|
||||
|
||||
if (scope_chunk_ == scope_chunks_) {
|
||||
gst_buffer_unref(latest_buffer_);
|
||||
latest_buffer_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void GstEngine::StartPreloading(const QUrl& url, bool force_stop_at_end,
|
||||
|
Loading…
x
Reference in New Issue
Block a user