mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-06 10:42:22 +00:00
omxvideodec: Fix some minor memory leaks
This commit is contained in:
parent
db08890edd
commit
9c9315059e
1 changed files with 9 additions and 0 deletions
|
@ -279,6 +279,7 @@ _find_nearest_frame (GstOMXVideoDec * self, GstOMXBuffer * buf)
|
||||||
if (diff_ticks > MAX_FRAME_DIST_TICKS
|
if (diff_ticks > MAX_FRAME_DIST_TICKS
|
||||||
|| diff_frames > MAX_FRAME_DIST_FRAMES) {
|
|| diff_frames > MAX_FRAME_DIST_FRAMES) {
|
||||||
g_warning ("Too old frame, bug in decoder -- please file a bug");
|
g_warning ("Too old frame, bug in decoder -- please file a bug");
|
||||||
|
g_slice_free (BufferIdentification, id);
|
||||||
gst_base_video_decoder_finish_frame (GST_BASE_VIDEO_DECODER (self),
|
gst_base_video_decoder_finish_frame (GST_BASE_VIDEO_DECODER (self),
|
||||||
tmp);
|
tmp);
|
||||||
l = GST_BASE_VIDEO_CODEC (self)->frames;
|
l = GST_BASE_VIDEO_CODEC (self)->frames;
|
||||||
|
@ -618,11 +619,19 @@ static gboolean
|
||||||
gst_omx_video_dec_reset (GstBaseVideoDecoder * decoder)
|
gst_omx_video_dec_reset (GstBaseVideoDecoder * decoder)
|
||||||
{
|
{
|
||||||
GstOMXVideoDec *self;
|
GstOMXVideoDec *self;
|
||||||
|
GList *l;
|
||||||
|
|
||||||
self = GST_OMX_VIDEO_DEC (decoder);
|
self = GST_OMX_VIDEO_DEC (decoder);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (self, "Resetting decoder");
|
GST_DEBUG_OBJECT (self, "Resetting decoder");
|
||||||
|
|
||||||
|
for (l = GST_BASE_VIDEO_CODEC (self)->frames; l; l = l->next) {
|
||||||
|
GstVideoFrame *frame = l->data;
|
||||||
|
|
||||||
|
g_slice_free (BufferIdentification, frame->coder_hook);
|
||||||
|
frame->coder_hook = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
gst_omx_port_set_flushing (self->in_port, TRUE);
|
gst_omx_port_set_flushing (self->in_port, TRUE);
|
||||||
gst_omx_port_set_flushing (self->out_port, TRUE);
|
gst_omx_port_set_flushing (self->out_port, TRUE);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue