If we don't consume the buffer by passing its reference to
overlay->text_buffer then we need to unref it.
Fix a leak with validate.file.playback.fast_forward.test5_mkv
when running inside Valgrind.
https://bugzilla.gnome.org/show_bug.cgi?id=747602
if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer))
overlay->text_segment.position = clip_start;
- overlay->text_buffer = buffer;
+ overlay->text_buffer = buffer; /* pass ownership of @buffer */
+ buffer = NULL;
+
/* That's a new text buffer we need to render */
overlay->need_render = TRUE;
GST_BASE_TEXT_OVERLAY_UNLOCK (overlay);
beach:
+ if (buffer)
+ gst_buffer_unref (buffer);
return ret;
}