if (subdev == NULL)
                return -EPIPE;
 
+       memset(&fmt, 0, sizeof(fmt));
        fmt.pad = pad;
        fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE;
 
        struct v4l2_subdev *subdev;
        int ret;
 
-       ret = video_device_pipeline_start(vdev, &video->pipe);
-       if (ret < 0)
+       ret = video_device_pipeline_alloc_start(vdev);
+       if (ret < 0) {
+               dev_err(video->camss->dev, "Failed to start media pipeline: %d\n", ret);
                goto flush_buffers;
+       }
 
        ret = video_check_format(video);
        if (ret < 0)
        struct media_entity *entity;
        struct media_pad *pad;
        struct v4l2_subdev *subdev;
+       int ret;
 
        entity = &vdev->entity;
        while (1) {
                entity = pad->entity;
                subdev = media_entity_to_v4l2_subdev(entity);
 
-               v4l2_subdev_call(subdev, video, s_stream, 0);
+               ret = v4l2_subdev_call(subdev, video, s_stream, 0);
+
+               if (entity->use_count > 1) {
+                       /* Don't stop if other instances of the pipeline are still running */
+                       dev_dbg(video->camss->dev, "Video pipeline still used, don't stop streaming.\n");
+                       return;
+               }
+
+               if (ret) {
+                       dev_err(video->camss->dev, "Video pipeline stop failed: %d\n", ret);
+                       return;
+               }
        }
 
        video_device_pipeline_stop(vdev);