mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
schroenc: minor memleak fix
This commit is contained in:
parent
e93ca3ac87
commit
cb3bac56bf
1 changed files with 10 additions and 0 deletions
|
@ -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... */
|
||||
|
|
Loading…
Reference in a new issue