summaryrefslogtreecommitdiff
path: root/ext/schroedinger/gstschroenc.c
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2010-11-15 11:37:39 -0800
committerDavid Schleef <ds@schleef.org>2010-11-27 19:09:51 -0800
commitcb3bac56bff2d5ffabbbb31579836fe2eae004ed (patch)
tree065ecc34cc2e4583707d78c98e9346523f0c8e7e /ext/schroedinger/gstschroenc.c
parente93ca3ac87fca556b2be4232aa82a1a07ffdb458 (diff)
downloadgstreamer-plugins-bad-cb3bac56bff2d5ffabbbb31579836fe2eae004ed.tar.gz
schroenc: minor memleak fix
Diffstat (limited to 'ext/schroedinger/gstschroenc.c')
-rw-r--r--ext/schroedinger/gstschroenc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/schroedinger/gstschroenc.c b/ext/schroedinger/gstschroenc.c
index 4a01028ec..b4e50a922 100644
--- a/ext/schroedinger/gstschroenc.c
+++ b/ext/schroedinger/gstschroenc.c
@@ -429,6 +429,14 @@ gst_schro_enc_stop (GstBaseVideoEncoder * base_video_encoder)
schro_encoder_free (schro_enc->encoder);
schro_enc->encoder = NULL;
}
+ if (schro_enc->seq_header_buffer) {
+ gst_buffer_unref (schro_enc->seq_header_buffer);
+ schro_enc->seq_header_buffer = NULL;
+ }
+ if (schro_enc->video_format) {
+ g_free (schro_enc->video_format);
+ schro_enc->video_format = NULL;
+ }
return TRUE;
}
@@ -775,6 +783,7 @@ gst_schro_enc_process (GstSchroEnc * schro_enc)
(double *) GST_BUFFER_DATA (buf), 21);
structure = gst_structure_new ("schroenc",
"frame-stats", GST_TYPE_BUFFER, buf, NULL);
+ gst_buffer_unref (buf);
message = gst_message_new_element (GST_OBJECT (schro_enc), structure);
gst_element_post_message (GST_ELEMENT (schro_enc), message);
}
@@ -784,6 +793,7 @@ gst_schro_enc_process (GstSchroEnc * schro_enc)
GST_DEBUG ("got eos");
//frame = schro_enc->eos_frame;
frame = NULL;
+ schro_buffer_unref (encoded_buffer);
}
/* FIXME: Get the frame from somewhere somehow... */