[longomatch] Fix memory leak with discarded buffers
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Fix memory leak with discarded buffers
- Date: Wed, 24 Sep 2014 20:31:59 +0000 (UTC)
commit 930a04faa1ad9e8a2a458a7046b63fa4a63e7a2e
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Sat Aug 16 00:12:44 2014 +0200
Fix memory leak with discarded buffers
libcesarplayer/gst-nle-source.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/libcesarplayer/gst-nle-source.c b/libcesarplayer/gst-nle-source.c
index 01025b0..44dad5d 100644
--- a/libcesarplayer/gst-nle-source.c
+++ b/libcesarplayer/gst-nle-source.c
@@ -284,7 +284,12 @@ gst_nle_source_push_buffer (GstNleSource * nlesrc, GstBuffer * buf,
item = (GstNleSrcItem *) g_list_nth_data (nlesrc->queue, nlesrc->index);
buf_ts = GST_BUFFER_TIMESTAMP (buf);
+
if (buf_ts < item->start) {
+ GST_LOG_OBJECT (nlesrc, "Discard early %s buffer with ts: %"
+ GST_TIME_FORMAT" start: %" GST_TIME_FORMAT, is_audio ? "audio" : "video",
+ GST_TIME_ARGS (buf_ts), GST_TIME_ARGS (item->start));
+ gst_buffer_unref (buf);
return GST_FLOW_OK;
}
buf_rel_ts = buf_ts - item->start;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]