Skip to content

Commit d78afc7

Browse files
committed
Check camera is be configured in start_encoder()
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
1 parent a87e911 commit d78afc7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

picamera2/picamera2.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2368,6 +2368,8 @@ def start_encoder(self, encoder=None, output=None, pts=None, quality=None, name=
23682368
output = FileOutput(output, pts=pts)
23692369
_encoder.output = output
23702370
streams = self.camera_configuration()
2371+
if not streams:
2372+
raise RuntimeError("Camera has not been configured")
23712373
if name is None:
23722374
name = self.encode_stream_name
23732375
if streams.get(name, None) is None:

0 commit comments

Comments
 (0)