Skip to content

Commit

Permalink
Copy encoder's input format from resizer
Browse files Browse the repository at this point in the history
When resize is requested, get the framesize right
  • Loading branch information
waveform80 committed Jun 14, 2016
1 parent 399c8bd commit 68f1213
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion picamera/encoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,10 @@ def _create_encoder(self, format):
assert not self.encoder
self.encoder = self.encoder_type()
self.output_port = self.encoder.outputs[0]
self.encoder.inputs[0].copy_from(self.input_port)
if self.resizer:
self.encoder.inputs[0].copy_from(self.resizer.outputs[0])
else:
self.encoder.inputs[0].copy_from(self.input_port)
self.encoder.outputs[0].copy_from(self.encoder.inputs[0])
# NOTE: We deliberately don't commit the output port format here as
# this is a base class and the output configuration is incomplete at
Expand Down

0 comments on commit 68f1213

Please sign in to comment.