mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
resindvd, uvch264src, dx9screencapsrc: fix clock ref leaks in error paths
https://bugzilla.gnome.org/show_bug.cgi?id=776376
This commit is contained in:
parent
70fbcf9c0f
commit
8e6375c08b
3 changed files with 9 additions and 0 deletions
|
@ -695,6 +695,7 @@ gst_input_selector_wait_running_time (RsnInputSelector * sel,
|
|||
cur_running_time -= base_time;
|
||||
else
|
||||
cur_running_time = 0;
|
||||
gst_object_unref (clock);
|
||||
}
|
||||
} else {
|
||||
GstSegment *active_seg;
|
||||
|
@ -814,6 +815,7 @@ gst_input_selector_cleanup_old_cached_buffers (RsnInputSelector * sel,
|
|||
cur_running_time -= base_time;
|
||||
else
|
||||
cur_running_time = 0;
|
||||
gst_object_unref (clock);
|
||||
}
|
||||
} else {
|
||||
GstPad *active_sinkpad;
|
||||
|
|
|
@ -2544,6 +2544,8 @@ error_remove:
|
|||
gst_bin_remove (GST_BIN (self), self->v4l2_src);
|
||||
|
||||
error:
|
||||
if (v4l2_clock)
|
||||
gst_object_unref (v4l2_clock);
|
||||
if (self->v4l2_src)
|
||||
gst_object_unref (self->v4l2_src);
|
||||
self->v4l2_src = NULL;
|
||||
|
|
|
@ -516,6 +516,7 @@ gst_dx9screencapsrc_create (GstPushSrc * push_src, GstBuffer ** buf)
|
|||
if (ret == GST_CLOCK_UNSCHEDULED) {
|
||||
/* Got woken up by the unlock function */
|
||||
GST_OBJECT_UNLOCK (src);
|
||||
gst_object_unref (clock);
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
GST_OBJECT_UNLOCK (src);
|
||||
|
@ -554,6 +555,8 @@ gst_dx9screencapsrc_create (GstPushSrc * push_src, GstBuffer ** buf)
|
|||
IDirect3DDevice9_GetFrontBufferData (src->d3d9_device, 0, src->surface);
|
||||
if (FAILED (hres)) {
|
||||
GST_DEBUG_OBJECT (src, "DirectX::GetBackBuffer failed.");
|
||||
if (clock != NULL)
|
||||
gst_object_unref (clock);
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
|
||||
|
@ -591,6 +594,8 @@ gst_dx9screencapsrc_create (GstPushSrc * push_src, GstBuffer ** buf)
|
|||
D3DLOCK_NO_DIRTY_UPDATE | D3DLOCK_NOSYSLOCK | D3DLOCK_READONLY);
|
||||
if (FAILED (hres)) {
|
||||
GST_DEBUG_OBJECT (src, "DirectX::LockRect failed.");
|
||||
if (clock != NULL)
|
||||
gst_object_unref (clock);
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue