[longomatch/0.20] Fix memory leak with discarded buffers
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch/0.20] Fix memory leak with discarded buffers
- Date: Fri, 15 Aug 2014 22:17:17 +0000 (UTC)
commit cd56aa3039da55e7c3b40d02763d996802c4c5da
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 86b922e..4d45a16 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]