camera: Fix hang when changing picture size

Change-Id: I46d060d470b96be56d84f273accf54702e72b321