Skip to content

Commit f440c63

Browse files
committed
gst: disconnect from camera in stop method
Otherwise a stopped source can not be restarted, because the camera is still in use. Fix #907
1 parent e6d9526 commit f440c63

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

gst/gstaravis.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,17 +462,21 @@ gst_aravis_stop( GstBaseSrc * src )
462462
{
463463
GError *error = NULL;
464464
GstAravis* gst_aravis = GST_ARAVIS(src);
465+
ArvCamera *camera;
465466
ArvStream *stream;
466467
GstCaps *all_caps;
467468

468469
GST_OBJECT_LOCK (gst_aravis);
469470
arv_camera_stop_acquisition (gst_aravis->camera, &error);
471+
camera = g_steal_pointer (&gst_aravis->camera);
470472
stream = g_steal_pointer (&gst_aravis->stream);
471473
all_caps = g_steal_pointer (&gst_aravis->all_caps);
472474
GST_OBJECT_UNLOCK (gst_aravis);
473475

474476
if (stream != NULL)
475477
g_object_unref (stream);
478+
if (camera != NULL)
479+
g_object_unref (camera);
476480
if (all_caps != NULL)
477481
gst_caps_unref (all_caps);
478482

0 commit comments

Comments
 (0)