avconv: Set error code before before jumping to fail.