Oops, we'd better unref these buffers to stop memory leaks

This commit is contained in:
David Sansome 2010-04-12 16:41:44 +00:00
parent e4c3c600b9
commit 07a851c951
1 changed files with 3 additions and 1 deletions

View File

@ -194,8 +194,10 @@ Engine::State GstEngine::state() const {
void GstEngine::AddBufferToScope(GstBuffer* buf) {
GstEnginePipeline* pipeline = qobject_cast<GstEnginePipeline*>(sender());
if (!pipeline || pipeline != current_pipeline_.get())
if (!pipeline || pipeline != current_pipeline_.get()) {
gst_buffer_unref(buf);
return;
}
g_queue_push_tail(delayq_, buf);
}