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:
Mark Furneaux 2014-10-04 10:39:33 -04:00
parent e8c2b4b267
commit 3be48f8f44
1 changed files with 5 additions and 0 deletions

View File

@ -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,