basevideo: Add destroy notify for the coder_hook to prevent memory leaks
Fixes bug #654293.
This commit is contained in:
parent
6f2c2609ac
commit
fc93c66d3b
@ -182,5 +182,8 @@ gst_base_video_codec_free_frame (GstVideoFrame * frame)
|
|||||||
gst_buffer_unref (frame->src_buffer);
|
gst_buffer_unref (frame->src_buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (frame->coder_hook_destroy_notify && frame->coder_hook)
|
||||||
|
frame->coder_hook_destroy_notify (frame->coder_hook);
|
||||||
|
|
||||||
g_free (frame);
|
g_free (frame);
|
||||||
}
|
}
|
||||||
|
@ -125,6 +125,8 @@ struct _GstVideoFrame
|
|||||||
int n_fields;
|
int n_fields;
|
||||||
|
|
||||||
void *coder_hook;
|
void *coder_hook;
|
||||||
|
GDestroyNotify coder_hook_destroy_notify;
|
||||||
|
|
||||||
GstClockTime deadline;
|
GstClockTime deadline;
|
||||||
|
|
||||||
gboolean force_keyframe;
|
gboolean force_keyframe;
|
||||||
|
@ -1288,6 +1288,9 @@ gst_base_video_decoder_free_frame (GstVideoFrame * frame)
|
|||||||
gst_buffer_unref (frame->src_buffer);
|
gst_buffer_unref (frame->src_buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (frame->coder_hook_destroy_notify && frame->coder_hook)
|
||||||
|
frame->coder_hook_destroy_notify (frame->coder_hook);
|
||||||
|
|
||||||
g_free (frame);
|
g_free (frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user